forked from jdalton/docdown
-
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (82 loc) · 2.69 KB
/
nodejs.yml
File metadata and controls
83 lines (82 loc) · 2.69 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
79
80
81
82
83
# This workflow will do a clean installation of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
paths:
- index.js
- lib/*.js
- bin-lib/*.js
- tests/**/*.mjs
- package.json
- package-lock.json
- .github/workflows/*.yml
- .c8rc.coveralls.json
- bin/docdown.js
pull_request:
branches: [main]
paths:
- index.js
- lib/*.js
- bin-lib/*.js
- tests/**/*.mjs
- package.json
- package-lock.json
jobs:
fail-early:
runs-on: ubuntu-latest
strategy:
matrix:
node_version:
- 20
- 22
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node_version }}
cache: 'npm'
- run: npm ci
- run: make docs
basic-checks:
runs-on: ubuntu-latest
needs: fail-early
strategy:
matrix:
node_version:
- 21
- 23
- 24
- 25
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node_version }}
cache: 'npm'
- name: install clean
run: npm ci
- run: make docs
coverage--node:
name: Node Coverage
runs-on: ubuntu-latest
needs: fail-early
steps:
- uses: actions/checkout@v4
- name: Use Node.js 22
uses: actions/setup-node@v6
with:
node-version: 22
cache: 'npm'
- run: npm ci
- run: npm install -g c8@10
- run: c8 -c ./.c8rc.coveralls.json -o ./coverage/from-usage/ make coverage--bin
- run: c8 -c ./.c8rc.coveralls.json -o ./coverage/from-tests/ node --test './tests/**/*.spec.mjs'
- run: cp -r ./coverage/*/tmp/*.json ./coverage/tmp
- run: c8 -c ./.c8rc.coveralls.json report
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2.2.3
with:
file: './coverage/lcov.info'