-
-
Notifications
You must be signed in to change notification settings - Fork 5
51 lines (48 loc) · 1.38 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
43
44
45
46
47
48
49
50
51
name: Node.js CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '10 2 * * *'
workflow_dispatch: ~
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node-version:
- 18
- 20
- current
os:
- ubuntu-latest
- windows-latest
include:
- node-version: 20
os: macos-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm i
- run: npm test
- run: npm run eslint
if: ${{ matrix.node-version == '20' && matrix.os == 'ubuntu-latest' }}
- name: Coveralls
if: ${{ matrix.node-version == '20' && matrix.os == 'ubuntu-latest' }}
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish codeclimate code coverage
if: ${{ matrix.node-version == '20' && matrix.os == 'ubuntu-latest' }}
uses: paambaati/codeclimate-action@v9.0.0
env:
CC_TEST_REPORTER_ID: 0653d2f9752a6c6febd3bb7cabfec48439868a02350b1c46da7d60837a42ad93
with:
coverageLocations: |
${{github.workspace}}/coverage/lcov.info:lcov