Skip to content

upgrade prisma

upgrade prisma #3636

name: Test, Lint and Typecheck
on: [push]
jobs:
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3 # needed until 18 becomes the default
with:
node-version: 18
cache: yarn
- name: Install node-gyp # needed for apollo server
run: yarn global add node-gyp
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Typecheck
run: yarn ts:check
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3 # needed until 18 becomes the default
with:
node-version: 18
cache: yarn
- name: Install node-gyp # needed for apollo server
run: yarn global add node-gyp
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Typecheck
run: yarn lint
test:
runs-on: ubuntu-latest
env:
POSTMARK_API_KEY: ${{ secrets.POSTMARK_API_KEY }}
FROM_EMAIL: ${{ secrets.FROM_EMAIL }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3 # needed until 18 becomes the default
with:
node-version: 18
cache: yarn
- name: Setup .env
run: cp apps/backend/.env.example apps/backend/.env
- name: Run Database
run: docker-compose up -d
- name: Install node-gyp # needed for apollo server
run: yarn global add node-gyp
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: NODE log
run: node -v
- name: Test
run: yarn test
timeout-minutes: 10
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3 # needed until 18 becomes the default
with:
node-version: 18
cache: yarn
- name: Install node-gyp # needed for apollo server
run: yarn global add node-gyp
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Test
run: yarn prettier:check
e2e-test:
runs-on: ubuntu-latest
environment: e2e-tests
env:
FILE_STORAGE_ACCOUNT_ID: ${{ secrets.FILE_STORAGE_ACCOUNT_ID }}
FILE_STORAGE_ACCESS_KEY_ID: ${{ secrets.FILE_STORAGE_ACCESS_KEY_ID }}
FILE_STORAGE_SECRET_ACCESS_KEY: ${{ secrets.FILE_STORAGE_SECRET_ACCESS_KEY }}
FILE_STORAGE_BUCKET: ${{ vars.FILE_STORAGE_BUCKET }}
POSTMARK_API_KEY: ${{ secrets.POSTMARK_API_KEY }}
FROM_EMAIL: ${{ secrets.FROM_EMAIL }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3 # needed until 18 becomes the default
with:
node-version: 18
cache: yarn
- name: Setup .env
run: cp apps/backend/.env.example apps/backend/.env
- name: Run Database
run: docker-compose up -d
- name: Install node-gyp # needed for apollo server
run: yarn global add node-gyp
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Build backend
run: yarn workspace backend build
- name: Run backend
run: yarn workspace backend start:e2e &
- name: Build frontend
run: yarn workspace serenity build:web:e2e
- name: Run frontend
run: yarn workspace serenity start:e2e &
- name: Sleep for 5 seconds
run: sleep 5s
shell: bash
- name: Curl backend
run: curl http://localhost:4001/graphql
- name: Curl frontend
run: curl --fail-with-body http://localhost:19006
- name: Echo SERENITY_ENV
run: echo $SERENITY_ENV
- name: Run e2e tests
# run: yarn workspace backend test:e2e test/e2e/authentication/login.e2e.ts
run: yarn workspace backend test:e2e
- name: Upload artifacts
if: always() # to make sure it runs even if the e2e tests fail
uses: actions/upload-artifact@v3
with:
path: apps/backend/test-results/**/*