-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (78 loc) · 2.12 KB
/
Copy pathnode-ci.yml
File metadata and controls
78 lines (78 loc) · 2.12 KB
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
name: Node.js CI
'on':
push:
branches:
- master
- beta
- renovate/**
pull_request:
types:
- opened
- synchronize
env:
FORCE_COLOR: 1
NPM_CONFIG_COLOR: always
permissions:
contents: read
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: .nvmrc
cache: npm
- run: npm clean-install
- run: npm install --global corepack@latest
- run: corepack npm audit signatures
- run: npm test
- name: Upload unit test coverage to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unit
report_type: coverage
verify-matrix:
runs-on: ubuntu-latest
strategy:
matrix:
node:
- 22.22.2
- 24.15.0
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
cache: npm
node-version: ${{ matrix.node }}
- run: npm clean-install
- run: OPTIONS="${{ matrix.options }}" npm test
release:
needs:
- verify
- verify-matrix
permissions:
contents: write
id-token: write
issues: write
pull-requests: write
uses: form8ion/semantic-release-workflow/.github/workflows/release.yml@5b42d839d056975d385d8c865247562cdccf8a67 # v2.1.3
secrets:
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
workflow-result:
runs-on: ubuntu-latest
needs:
- verify
- verify-matrix
- release
if: ${{ !cancelled() }}
steps:
- name: All matrix versions passed
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Some matrix version failed
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1