-
Notifications
You must be signed in to change notification settings - Fork 37
72 lines (69 loc) · 2.18 KB
/
node.js.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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [dev]
pull_request:
branches: [dev]
jobs:
tests:
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
test-kind: ['unit-tests']
steps:
- uses: actions/checkout@v2
- name: Run test "${{ matrix.test-kind }}"
uses: actions/setup-node@v1
with:
node-version: 18.x
- run: yarn install --immutable --immutable-cache
- run: yarn tsc-check
- run: yarn ${{ matrix.test-kind }}
check-cache:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
uses: actions/setup-node@v1
with:
node-version: 18.x
- run: yarn install --immutable --immutable-cache --check-cache
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Lint, Tsc and Formatting
uses: actions/setup-node@v1
with:
node-version: 18.x
- run: yarn install --immutable --immutable-cache
- run: yarn lint
tests-e2e:
runs-on: ubuntu-latest
container: mcr.microsoft.com/playwright:v1.36.1-focal
strategy:
matrix:
test-kind: ['g:e2e --shard=1/1']
steps:
- uses: actions/checkout@v3
- name: Set git safe directory
# This is added as a fix for https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Run e2e tests "${{ matrix.test-kind }}"
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: yarn install
run: yarn install --immutable --immutable-cache
- name: Install playwright dependencies
run: yarn g:playwright-dep
- run: yarn ${{ matrix.test-kind }}
- uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30