Skip to content

Commit 8a31640

Browse files
committed
fix: Update GitHub workflow for Angular 14 compatibility
- Update Actions to latest versions (checkout@v4, setup-node@v4, codecov@v4) - Update Node.js versions to 16.x, 18.x, 20.x (remove deprecated 14.x) - Add Chrome setup for headless testing - Use npm ci and built-in caching for better performance - Use npm run scripts instead of npx commands - Make codecov upload optional to prevent CI failures
1 parent 6174cdd commit 8a31640

File tree

1 file changed

+28
-20
lines changed

1 file changed

+28
-20
lines changed

.github/workflows/test.yml

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,41 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
node-version: [14.x, 16.x]
19+
node-version: [16.x, 18.x, 20.x]
2020

2121
steps:
22-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v4
23+
2324
- name: Use Node.js ${{ matrix.node-version }}
24-
uses: actions/setup-node@v1
25+
uses: actions/setup-node@v4
2526
with:
2627
node-version: ${{ matrix.node-version }}
27-
- name: Cache Node.js modules
28-
uses: actions/cache@v2
28+
cache: 'npm'
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
33+
- name: Setup Chrome
34+
uses: browser-actions/setup-chrome@v1
2935
with:
30-
path: ~/.npm
31-
key: ${{ runner.OS }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
32-
restore-keys: |
33-
${{ runner.OS }}-node-${{ matrix.node-version }}-
34-
${{ runner.OS }}-node-
35-
${{ runner.OS }}-
36-
37-
- name: Install deps
38-
run: npm install
36+
chrome-version: stable
37+
3938
- name: Linting
40-
run: npx ng lint
41-
- name: Build lib
42-
run: npx ng build ngx-ui-loader
39+
run: npm run lint
40+
41+
- name: Build library
42+
run: npm run build:lib
43+
44+
- name: Build schematics
45+
run: npm run build:schematics
46+
4347
- name: Testing
44-
run: npm test
48+
run: npm run test
49+
4550
- name: Upload codecov report
46-
uses: codecov/codecov-action@v1
51+
uses: codecov/codecov-action@v4
52+
with:
53+
fail_ci_if_error: false
54+
4755
- name: Production build
48-
run: npx ng build
56+
run: npm run build

0 commit comments

Comments
 (0)