-
Notifications
You must be signed in to change notification settings - Fork 3
119 lines (112 loc) · 3.29 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
name: Checks
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
setup:
name: Setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.11.0
cache: 'npm'
cache-dependency-path: |
dependencies/package-lock.json
package-lock.json
- name: install @lastui/rocker dependencies
run: npm ci --no-fund --no-audit
- name: install @lastui/dependencies dependencies
working-directory: dependencies
run: npm ci --no-fund --no-audit
compile:
name: Compile
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.11.0
cache: 'npm'
cache-dependency-path: |
dependencies/package-lock.json
package-lock.json
- run: npm ci --no-fund --no-audit --prefer-offline --prefix=dependencies
- run: npm ci --no-fund --no-audit --prefer-offline
- run: npm run build:dependencies
- run: npm run build:platform
- run: npm run build:bootstrap
- run: npm run postbuild
- name: Cache workspace
id: cache
uses: actions/cache/save@v4
with:
path: |
dependencies/index.js
dependencies/sbom.json
dependencies/dll
platform/dll
bootstrap/dll
key: cache-${{ github.sha }}-dlls
test:
name: Test
needs: setup
permissions:
checks: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.11.0
cache: 'npm'
cache-dependency-path: |
dependencies/package-lock.json
package-lock.json
- run: npm ci --no-fund --no-audit --prefer-offline --prefix=dependencies
- run: npm ci --no-fund --no-audit --prefer-offline
- name: Test package platform
working-directory: platform
run: node ../cli/index.js test
- name: Collect coverage for platform
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
fail_ci_if_error: true
flags: unittests
file: platform/coverage/clover.xml
- name: Test package bootstrap
working-directory: bootstrap
run: node ../cli/index.js test
- name: Collect coverage for bootstrap
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
fail_ci_if_error: true
flags: unittests
file: bootstrap/coverage/clover.xml
lint:
name: Lint
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.11.0
cache: 'npm'
cache-dependency-path: |
dependencies/package-lock.json
package-lock.json
- run: npm ci --no-fund --no-audit --prefer-offline --prefix=dependencies
- run: npm ci --no-fund --no-audit --prefer-offline
- run: npm run lint -- --debug