-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (37 loc) · 1.04 KB
/
build.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
name: build
on: push
jobs:
build:
name: Build, lint, and test on Node.js ${{ matrix.node }}
runs-on: ubuntu-latest
strategy:
matrix:
node: ["18.x", "20.x"]
steps:
- uses: actions/checkout@v4
- name: Setup Node v${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: npm
- name: Install pango for NPM package "canvas"
run: sudo apt-get update && sudo apt-get install -y libpango1.0-dev
- name: Install NPM dependencies
run: npm install --package-lock
- name: Lint project
run: npm run lint
- name: Format project
run: npm run format
- name: Build packages
run: npm run build
- name: Test project
run: npm test
- name: Check for clean git tree
shell: bash
run: |
if [[ $(git status -s) ]]
then
echo "The following files have changed:"
git status -s
exit 1
fi