-
Notifications
You must be signed in to change notification settings - Fork 5
55 lines (44 loc) · 1.22 KB
/
mops-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: mops test
on:
push:
branches:
- main
- master
pull_request:
jobs:
test:
strategy:
max-parallel: 3
matrix:
moc-version: [0.9.3, 0.9.7]
mops-version: [./cli, ic-mops@latest, ic-mops@0.19]
node-version: [16, 20]
runs-on: ubuntu-latest
name: node ${{ matrix.node-version }}, moc ${{ matrix.moc-version }}, ${{ matrix.mops-version }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Cache mops packages
uses: actions/cache@v3
with:
key: mops-packages-${{ hashFiles('mops.toml') }}
path: |
~/.cache/mops
- name: Select moc version
run: npx mocv use ${{ matrix.moc-version }}
- name: Install npm packages
run: |
cd cli
npm install
- name: Build local cli
if: ${{ matrix.mops-version == './cli' }}
run: cd cli && npm run prepare
- name: Install mops
run: npm i -g ${{ matrix.mops-version }}
- name: Install mops packages
run: mops install
- name: Run tests
run: mops test