-
Notifications
You must be signed in to change notification settings - Fork 72
87 lines (71 loc) · 1.86 KB
/
pull-request.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Pull Request
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Testing with Node version (${{ matrix.node }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [18.x, 20.x, 22.x, 23.x]
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: Lint
run: yarn quality:lint
- name: Check circular dependencies
run: yarn quality:circular-deps
- name: Unit tests
run: yarn quality:test
e2e:
runs-on: ubuntu-latest
container:
image: cypress/browsers
options: --user 1001
services:
database:
image: postgres:latest
env:
POSTGRES_DB: demo
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/iron'
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: E2E tests
uses: cypress-io/github-action@v6
env:
DATABASE_HOST: database
DATABASE_PORT: 5432
DATABASE_NAME: demo
DATABASE_USER: postgres
DATABASE_PASSWORD: postgres
IS_TEST: 1
with:
command: yarn quality:e2e:ci
install: false