-
Notifications
You must be signed in to change notification settings - Fork 13
66 lines (60 loc) · 3.19 KB
/
node.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
name: Node.js
on:
push:
pull_request:
env:
MCO_LOG_LEVEL: warn
EXTERNAL_HOST: mcouniverse.com
PRIVATE_KEY_FILE: thebeast/data/private_key.pem
CERTIFICATE_FILE: thebeast/data/mcouniverse.crt
PUBLIC_KEY_FILE: thebeast/data/pub.key
jobs:
build-test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 21.x]
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: ${{ matrix.node-version }}
# - name: Resolve Outdated Comments
# uses: Ardiannn08/resolve-outdated-comment@v1.3
# with:
# token: ${{ secrets.GH_TOKEN }}
# mode: "delete"
- name: Install and test
run: |
npm install
npm run test --workspaces --if-present
env:
CODECOV_UPLOAD_BUNDLE_TOKEN: ${{ secrets.CODECOV_UPLOAD_BUNDLE_TOKEN }}
- name: Codecov
if: ${{ always() }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
pip install --user pytest
pip install --user codecov-cli
codecovcli --verbose create-commit --fail-on-error
codecovcli --verbose create-report --fail-on-error
codecovcli do-upload --report-type test_results --file mcos.junit.xml
codecovcli --verbose do-upload --fail-on-error --flag cli --name cli-${{ matrix.node-version }}
codecovcli --verbose do-upload --fail-on-error --flag connection --name connection-${{ matrix.node-version }}
codecovcli --verbose do-upload --fail-on-error --flag database --name database-${{ matrix.node-version }}
codecovcli --verbose do-upload --fail-on-error --flag gateway --name gateway-${{ matrix.node-version }}
codecovcli --verbose do-upload --fail-on-error --flag mcots --name mcots-${{ matrix.node-version }}
codecovcli --verbose do-upload --fail-on-error --flag nps --name nps-${{ matrix.node-version }}
codecovcli --verbose do-upload --fail-on-error --flag patch --name patch-${{ matrix.node-version }}
codecovcli --verbose do-upload --fail-on-error --flag shard --name shard-${{ matrix.node-version }}
codecovcli --verbose do-upload --fail-on-error --flag shared --name shared-${{ matrix.node-version }}
codecovcli --verbose do-upload --fail-on-error --flag shared-packets --name shared-packets-${{ matrix.node-version }}
codecovcli --verbose do-upload --fail-on-error --flag schema --name schema-${{ matrix.node-version }}
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4
with:
name: coverage_${{ matrix.node-version }}
path: coverage