User blacklist middleware #378
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
typecheck: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:latest | |
ports: | |
- 5432:5432 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: acm_website | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup | |
with: | |
os: ${{ runner.os }} | |
- name: Run typecheck | |
env: | |
NODE_ENV: test | |
PORT: 5001 | |
POSTGRES_HOST: localhost | |
POSTGRES_PORT: 5432 | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: acm_website | |
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }} | |
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }} | |
GOOGLE_REDIRECT_URI: http://localhost:5001/api/v1/auth/callback | |
run: | | |
docker run --network host \ | |
-e NODE_ENV -e PORT -e POSTGRES_HOST -e POSTGRES_PORT -e POSTGRES_USER -e POSTGRES_PASSWORD -e POSTGRES_DB \ | |
-e GOOGLE_CLIENT_ID -e GOOGLE_CLIENT_SECRET -e GOOGLE_REDIRECT_URI \ | |
acm-website-server bun typecheck | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
- uses: ./.github/actions/setup | |
with: | |
os: ${{ runner.os }} | |
- name: Run linter | |
run: | | |
docker run --network host \ | |
-e NODE_ENV -e PORT -e POSTGRES_HOST -e POSTGRES_PORT -e POSTGRES_USER -e POSTGRES_PASSWORD -e POSTGRES_DB \ | |
-e GOOGLE_CLIENT_ID -e GOOGLE_CLIENT_SECRET -e GOOGLE_REDIRECT_URI \ | |
acm-website-server bun run lint | |
test: | |
runs-on: ubuntu-latest | |
services: | |
db: | |
image: postgres:latest | |
ports: | |
- 5432:5432 | |
volumes: | |
- ./db-scripts:/docker-entrypoint-initdb.d/ | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_DB: acm_website | |
options: >- | |
--health-cmd "pg_isready -U postgres" | |
--health-interval 5s | |
--health-timeout 5s | |
--health-retries 5 | |
--health-start-period 15s | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup | |
with: | |
os: ${{ runner.os }} | |
- name: Run tests | |
env: | |
NODE_ENV: test | |
PORT: 5001 | |
POSTGRES_HOST: localhost | |
POSTGRES_PORT: 5432 | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: acm_website | |
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }} | |
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }} | |
GOOGLE_REDIRECT_URI: http://localhost:5001/api/v1/auth/callback | |
run: | | |
docker run --network host \ | |
-e NODE_ENV -e PORT -e POSTGRES_HOST -e POSTGRES_PORT -e POSTGRES_USER -e POSTGRES_PASSWORD -e POSTGRES_DB \ | |
-e GOOGLE_CLIENT_ID -e GOOGLE_CLIENT_SECRET -e GOOGLE_REDIRECT_URI \ | |
acm-website-server bun test | |
# build: | |
# needs: [typecheck, lint, test] | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: Build | |
# run: | | |
# cd ./server | |
# docker build --target=run --no-cache . |