-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (65 loc) · 2.6 KB
/
test.yaml
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
name: Code Quality Checks
on:
push:
schedule:
- cron: '0 9 * * *' # every day at 9:00
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
NX_BRANCH: ${{ github.event.number || github.ref_name }}
NX_VERBOSE_LOGGING: true
NX_NO_CLOUD: true
jobs:
test:
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Enable Corepack
run: corepack enable
- name: Configure Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Fetch Git history
run: git fetch --no-tags --depth=50 origin main
- name: Install dependencies
run: yarn --immutable --inline-builds
- name: Build
run: yarn build
- name: Check code-style format
run: yarn format:check
- name: Lint
run: yarn lint
- name: Test
run: yarn test
- name: Check Types
run: yarn types
- name: Publish Web Package Code Coverage
# When Nx hits its cloud cache, there is no generated coverage to sent, e.g. do not let this crash
if: ${{ hashFiles('./packages/web/.coverage/lcov.info') != '' }}
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: ./packages/web/.coverage/lcov.info
flag-name: web
carryforward: web-react, web-twig, analytics, design-tokens, icons, common, codemods, form-validations
- name: Publish Web-React Package Code Coverage
# When Nx hits its cloud cache, there is no generated coverage to sent, e.g. do not let this crash
if: ${{ hashFiles('./packages/web-react/.coverage/lcov.info') != '' }}
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: ./packages/web-react/.coverage/lcov.info
flag-name: web-react
carryforward: web, web-twig, analytics, design-tokens, icons, common, codemods, form-validations
- name: Publish Analytics Package Code Coverage
# When Nx hits its cloud cache, there is no generated coverage to sent, e.g. do not let this crash
if: ${{ hashFiles('./packages/analytics/.coverage/lcov.info') != '' }}
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: ./packages/analytics/.coverage/lcov.info
flag-name: analytics
carryforward: web, web-react, web-twig, design-tokens, icons, common, codemods, form-validations