-
Notifications
You must be signed in to change notification settings - Fork 55
60 lines (47 loc) · 1.59 KB
/
nodejs.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
# This workflow will do a clean install 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:
branches: [ devel ]
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# https://github.com/nodejs/release#release-schedule
# https://github.com/actions/setup-node#supported-version-syntax
node-version:
- "lts/*"
- "latest"
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
cache: npm
node-version: ${{ matrix.node-version }}
- name: Log the Node.js version used
run: echo "::notice::Using Node.js $( node -v)"
- name: Install dependencies
run: npm ci
- name: Lint the code
run: npm run lint
- name: Run prettier
run: npx prettier --check .
- name: Run the tests
run: npm test
# https://github.com/marketplace/actions/coveralls-github-action
# upload coverage report for just one of Node.js version matrix runs
- name: Upload coverage report to Coveralls
if: matrix.node-version == '18.x'
uses: coverallsapp/github-action@v2.3.0
continue-on-error: true
with:
github-token: ${{ github.token }}
- name: Check types definition
run: npm run check-dts
- name: Check dependencies
run: npm run check-dependencies