This repository has been archived by the owner on Oct 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
140 lines (128 loc) · 3.55 KB
/
checks.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: Checks, linting and tests for CI
on:
push:
branches:
- main
pull_request:
jobs:
yarn:
name: Cache of yarn matches checksums in lockfile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions/setup-node@v3
with:
node-version-file: .tool-versions
- run: yarn --immutable --immutable-cache --check-cache
build:
name: Build succeeds
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions/setup-node@v3
with:
cache: yarn
node-version-file: .tool-versions
- run: yarn --immutable --immutable-cache
- run: yarn build
prettier:
name: All source files are well formated with prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions/setup-node@v3
with:
cache: yarn
node-version-file: .tool-versions
- run: yarn --immutable --immutable-cache
- run: yarn lint:prettier --loglevel debug
tsc:
name: TypeScript compiles
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions/setup-node@v3
with:
cache: yarn
node-version-file: .tool-versions
- run: yarn --immutable --immutable-cache
- run: yarn lint:tsc
eslint:
name: ESLint has no errors
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions/setup-node@v3
with:
cache: yarn
node-version-file: .tool-versions
- run: yarn --immutable --immutable-cache
- run: yarn lint:eslint
test:
name: Jest integration tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions/setup-node@v3
with:
cache: yarn
node-version-file: .tool-versions
- run: yarn --immutable --immutable-cache
- run: yarn test
# https://docs.cypress.io/guides/continuous-integration/github-actions#Basic-Setup
cypress:
name: Run cypress tests (locally)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions/setup-node@v3
with:
cache: yarn
node-version-file: .tool-versions
- name: Cypress run
uses: cypress-io/github-action@v5
with:
install-command: yarn --immutable --immutable-cache
browser: chrome
start: yarn start:server
wait-on: 'http://localhost:3000'
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-outcome
path: |
cypress/screenshots
cypress/videos
cypress-docker:
name: Run cypress tests (with docker build)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions/setup-node@v3
with:
cache: yarn
node-version-file: .tool-versions
- name: Cypress run
uses: cypress-io/github-action@v5
with:
install-command: yarn --immutable --immutable-cache
browser: chrome
build: yarn docker:build
start: yarn docker:run
wait-on: 'http://localhost:3000'