-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (55 loc) · 1.38 KB
/
tests.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
53
54
55
56
57
58
59
name: Tests
on:
push:
pull_request:
branches: [main]
jobs:
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
environment: Staging
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
DATABASE_AUTH_TOKEN: ${{ secrets.DATABASE_AUTH_TOKEN }}
SECRET: ${{ secrets.SECRET }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Clean Install
run: npm ci
- name: Tests
run: npm run test:unit -- run
e2e-tests:
name: e2e Tests
runs-on: ubuntu-latest
environment: Staging
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
DATABASE_AUTH_TOKEN: ${{ secrets.DATABASE_AUTH_TOKEN }}
SECRET: ${{ secrets.SECRET }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Clean Install
run: npm ci
- name: Tests
run: |
npx playwright install --with-deps
npm run test:e2e
- name: Upload Artifact
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30