-
Notifications
You must be signed in to change notification settings - Fork 355
99 lines (82 loc) · 2.25 KB
/
main.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
88
89
90
91
92
93
94
95
96
97
98
99
name: CI
on:
pull_request:
workflow_call:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out project
uses: actions/checkout@v4
- name: Set up project
uses: ./.github/actions/setup-project
with:
skip-build: true
- uses: actions/cache@v4
name: Cache files proccesed by ESLint
with:
path: .eslintcache
key: ${{ runner.os }}-eslint-cache
- name: Run linter
run: yarn lint:all
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out project
uses: actions/checkout@v4
- name: Set up and build project
uses: ./.github/actions/setup-project
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
needs: build
steps:
- name: Check out project
uses: actions/checkout@v4
- name: Set up and build project
uses: ./.github/actions/setup-project
- name: Run tests
run: yarn test --maxWorkers=2
demo-app:
name: Build demo app
runs-on: ubuntu-latest
needs: build
steps:
- name: Check out project
uses: actions/checkout@v4
- name: Set up and build project
uses: ./.github/actions/setup-project
- name: Build demo app
run: yarn build:integration
- name: Upload demo app
uses: actions/upload-artifact@v4
with:
name: demo-app
path: packages/react-integration/demo-app-ts/dist
integration-tests:
name: Integration tests
runs-on: ubuntu-latest
needs: demo-app
strategy:
fail-fast: false
matrix:
worker: [0, 1, 2, 3, 4]
steps:
- name: Check out project
uses: actions/checkout@v4
- name: Set up and build project
uses: ./.github/actions/setup-project
- name: Download demo app
uses: actions/download-artifact@v4
with:
name: demo-app
path: packages/react-integration/demo-app-ts/dist
- name: Print environment variables
run: printenv
- name: Run Cypress tests
run: yarn serve:integration & yarn test:integration -s $(node .github/split.js)
env:
WORKER_NUM: ${{ matrix.worker }}
WORKER_COUNT: 5