-
-
Notifications
You must be signed in to change notification settings - Fork 34
42 lines (39 loc) · 1.28 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
name: Node.js CI
on: [push]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
name: Continuous Integration
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [18.x, 20.x]
webpack-version: ["5.2.0", 5]
dev-server-version: ["3.6.0", 3]
css-loader-version: ["3.5.0", latest]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- name: Installing dependencies
run: pnpm install
- name: Installing specific dependency versions
run: pnpm install webpack@${{ matrix.webpack-version }} webpack-dev-server@${{ matrix.dev-server-version }} css-loader@${{ matrix.css-loader-version }}
- name: Building (if needed)
run: pnpm --if-present run build
- name: Running tests
run: pnpm test
- name: Generating coverage report
run: pnpm lcov
- name: Upload code coverage
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
files: ./coverage.lcov
token: ${{ secrets.CODECOV_TOKEN }}