-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (45 loc) · 1.45 KB
/
unit-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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: 'Run all unit tests'
on:
push:
branches: [magistra]
pull_request:
branches: [magistra]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [18.x, 20.x]
os: [macOS-latest, ubuntu-latest]
steps:
# https://github.com/actions/checkout
- name: Setup repo
uses: actions/checkout@v3.5.2
# https://github.com/FedericoCarboni/setup-ffmpeg
- uses: FedericoCarboni/setup-ffmpeg@v2
with:
# Not strictly necessary, but it may prevent rate limit
# errors especially on GitHub-hosted macos machines.
token: ${{ secrets.GITHUB_TOKEN }}
id: setup-ffmpeg
# https://github.com/actions/setup-node
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3.6.0
with:
node-version: ${{ matrix.node-version }}
- name: Setup ImageMagick (mac OS)
run: |
# You need brew on mac OS
brew install imagemagick
if: matrix.os == 'macOS-latest'
- name: Setup ImageMagick (Ubuntu)
run: |
sudo curl --output "/usr/bin/magick" "https://imagemagick.org/archive/binaries/magick"
sudo chmod a+x "/usr/bin/magick"
sudo apt-get install --no-install-recommends libfuse2
magick --version
if: matrix.os == 'ubuntu-latest'
- name: Prepare
run: dev/install
- name: Run tests
run: dev/test