-
Notifications
You must be signed in to change notification settings - Fork 16
52 lines (52 loc) · 1.49 KB
/
e2e.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: E2E, Lint & Unit tests
on:
push:
branches:
- "main"
pull_request:
jobs:
start:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Enable corepack
run: corepack enable
- uses: actions/setup-node@v3
with:
node-version: 20
cache: "yarn"
- name: Cache playwright dependencies
id: cache-playwright
uses: actions/cache@v3
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('**/yarn.lock') }}
- name: Start docker-compose
run: docker compose up -d
- name: Install dependencies
run: yarn install
- name: Run linter
run: yarn lint
- name: Run typecheck
run: yarn typecheck
- name: Install playwright dependencies
if: steps.cache-playwright.outputs.cache-hit != 'true'
run: npx playwright install --with-deps
- name: Fill database
run: yarn database
- name: Build packages
run: yarn build:example
- name: Start server
run: yarn start:example &
- name: Run tests
run: |
yarn test
yarn turbo test:e2e
cd apps/example && yarn prisma db seed && cd -
BASE_URL=http://localhost:3000/pagerouter/admin yarn test:e2e
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30