-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (62 loc) · 2.28 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: jdispatcher-viewers
on: [push]
jobs:
check:
runs-on: ubuntu-latest
steps:
#----------------------------------------------
# Check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v4
#----------------------------------------------
# Install Canvas/Fabric dependencies
#----------------------------------------------
- name: Install Canvas/Fabric Dependencies
run: |
sudo apt update
sudo apt install -y build-essential \
g++ libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
#----------------------------------------------
# Try a "clean" install (without forcing dependencies)
#----------------------------------------------
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18.20'
- name: Clean install
run: npm install --dry-run
#----------------------------------------------
# Check if lock-file is compatible with packages.json
#----------------------------------------------
- name: Check lockfile
run: |
npm install --force
git ls-files -m | grep -q package-lock.json \
&& { echo "WARNING - Lock file is outdated!" && exit 1; }
exit 0
#----------------------------------------------
# Run npm audit
#----------------------------------------------
- name: Npm audit
run: npm audit
#----------------------------------------------
# Check code format
#----------------------------------------------
- name: Check code format
run: npm run format
#----------------------------------------------
# Run tests with Jest
#----------------------------------------------
- name: Run tests with Jest
run: npm test
#----------------------------------------------
# Build Module
#----------------------------------------------
- name: Build module
run: npm run build
#----------------------------------------------
# Build Node CLI
#----------------------------------------------
- name: Build CLI
run: npm run build:cli