-
Notifications
You must be signed in to change notification settings - Fork 5
58 lines (47 loc) · 1.33 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
56
57
58
name: mops test
on:
push:
branches:
- main
- master
pull_request:
jobs:
test:
strategy:
max-parallel: 3
matrix:
moc-version: [0.10.0, latest]
mops-version: [./cli, ic-mops@latest, ic-mops@0.28.2]
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') }}
restore-keys: |
mops-packages-${{ hashFiles('mops.toml') }}
mops-packages-
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