-
Notifications
You must be signed in to change notification settings - Fork 16
67 lines (62 loc) · 2.44 KB
/
node.yml
File metadata and controls
67 lines (62 loc) · 2.44 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
name: Node.js
on:
push:
pull_request:
workflow_dispatch:
merge_group:
jobs:
build-test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [24.x,25.x]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8
with:
node-version: ${{ matrix.node-version }}
- name: Install and test
run: |
npm install-ci-test
npm run coverage
env:
CODECOV_UPLOAD_BUNDLE_TOKEN: ${{ secrets.CODECOV_UPLOAD_BUNDLE_TOKEN }}
- name: Codecov install cli
if: ${{ always() }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
pip install --user pytest
pip install --user codecov-cli
- name: Codecov create comit and report
if: ${{ always() }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
codecovcli --verbose create-commit --fail-on-error
codecovcli --verbose create-report --fail-on-error
- name: Codecov upload test results
if: ${{ always() }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
codecovcli do-upload --report-type test_results --file mcos.junit.xml
- name: Codecov upload coverage
if: ${{ always() }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
codecovcli --verbose do-upload --fail-on-error --name ${{ matrix.node-version }}
- name: Upload coverage to Coveralls
if: matrix.node-version == '24.x'
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: ./coverage/lcov.info
- uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4
with:
name: coverage_${{ matrix.node-version }}
path: coverage