-
Notifications
You must be signed in to change notification settings - Fork 4
36 lines (34 loc) · 1.02 KB
/
test.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
name: Test
on:
push: {}
pull_request: {}
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.19, 20]
steps:
- name: Install Mermaid `trebuchet ms` font
run: |
# accept Microsoft Corefonts EULA first
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | \
sudo debconf-set-selections
# install fonts
sudo apt-get install ttf-mscorefonts-installer -y \
|| { sudo apt-get update && sudo apt-get install ttf-mscorefonts-installer -y; }
- uses: actions/checkout@v4
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Update NPM
# NPM 10 drops Node.JS v14 support
run: npm install -g npm@9
- name: Install NPM Packages
run: npm ci
- name: Lint
run: npm run lint
- name: Test
run: npm test