-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (52 loc) · 1.59 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
52
53
54
55
56
57
58
59
# This workflow will do a clean install of node dependencies and run tests across different versions of node and operating systems
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
lint:
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
name: ESLint
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 16
- run: yarn --frozen-lockfile
- run: yarn lint-report
- uses: ataylorme/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
report-json: "eslint_report.json"
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: [14.x, 16.x, 18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
os: [ubuntu-latest, macos-latest]
name: Node.js ${{ matrix.node_version }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
- run: yarn --frozen-lockfile
- run: yarn test
coverage:
runs-on: ubuntu-latest
name: Coveralls
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 16
- run: yarn --frozen-lockfile
- run: yarn coverage
- uses: coverallsapp/[email protected]
with:
github-token: ${{secrets.GITHUB_TOKEN}}