-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (56 loc) · 1.54 KB
/
e2e-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
60
61
62
63
64
65
66
67
68
69
name: e2e Tests
on:
push:
paths:
- 'e2e/**'
- 'shared/**'
- 'api/**'
- 'client/**'
- '.github/workflows/e2e-tests.yml'
- '/*' # include changes in root
- '!infrastructure/**' # exclude infra folder
- 'package.json'
workflow_dispatch:
jobs:
e2e-tests:
name: e2e tests
runs-on: ubuntu-22.04
services:
database:
image: postgis/postgis:16-3.4
ports:
- 5432:5432
env:
POSTGRES_USER: blue-carbon-cost
POSTGRES_PASSWORD: blue-carbon-cost
POSTGRES_DB: blc
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Node setup
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- uses: pnpm/action-setup@v4
- name: Cache dependencies
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node_modules-
- name: Install dependencies
working-directory: .
run: pnpm install
- name: Install Chromium browser
working-directory: e2e
run: npx playwright install --with-deps chromium
- name: Run e2e tests
working-directory: e2e
run: pnpm test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30