♻️ Switch to next-auth for handling authentication #1805
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: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
linting: | |
name: Linting | |
runs-on: ubuntu-latest | |
env: | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: yarn | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Check linting rules | |
run: yarn lint | |
- name: Check types | |
run: yarn lint:tsc | |
# Label of the container job | |
integration-tests: | |
name: Run tests | |
# Containers must run in Linux based operating systems | |
runs-on: ubuntu-latest | |
env: | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
steps: | |
# Downloads a copy of the code in your repository before running CI tests | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: yarn | |
- name: Set environment variables | |
run: | | |
echo "DATABASE_URL=postgresql://postgres:password@localhost:5432/db" >> $GITHUB_ENV | |
echo "SECRET_PASSWORD=abcdefghijklmnopqrstuvwxyz1234567890" >> $GITHUB_ENV | |
echo "[email protected]" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Run db | |
run: | | |
docker pull postgres:14.2 | |
docker run -d -p 5432:5432 -e POSTGRES_PASSWORD=password -e POSTGRES_DB=db postgres:14.2 | |
yarn wait-on --timeout 60000 tcp:localhost:5432 | |
- name: Deploy migrations | |
run: yarn db:deploy | |
- name: Install playwright dependencies | |
run: yarn playwright install --with-deps chromium | |
- name: Run tests | |
run: yarn test | |
- name: Upload artifact playwright-report | |
if: ${{ success() || failure() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: playwright-report | |
path: ./apps/web/playwright-report |