-
Notifications
You must be signed in to change notification settings - Fork 5
63 lines (51 loc) · 1.65 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
59
60
61
62
63
name: mops test
on:
push:
branches:
- main
- master
pull_request:
jobs:
test:
strategy:
max-parallel: 3
fail-fast: false
matrix:
mops-version: [./cli/dist, ic-mops@1.0.0, "https://cli.mops.one/versions/latest.tgz"]
moc-version: [0.11.1]
node-version: [18, 20, 22]
runner: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.runner }}
name: ${{ matrix.runner }}, node ${{ matrix.node-version }}, moc ${{ matrix.moc-version }}, ${{ matrix.mops-version }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Cache mops packages
uses: actions/cache@v4
with:
key: mops-packages-${{ runner.os }}-${{ hashFiles('mops.toml') }}
restore-keys: |
mops-packages-${{ runner.os }}-${{ hashFiles('mops.toml') }}
mops-packages-${{ runner.os }}
path: |
~/.cache/mops
~/Library/Caches/mops
- name: Install npm packages
if: ${{ matrix.mops-version == './cli/dist' }}
run: cd cli && npm install
- name: Build local cli
if: ${{ matrix.mops-version == './cli/dist' }}
run: cd cli && npm run prepare
- name: Install mops
run: npm i -g ${{ matrix.mops-version }}
- name: Install mops packages
run: mops install
- name: Print resolved mops packages
run: mops sources
- name: Select moc version
run: mops toolchain use moc ${{ matrix.moc-version }}
- name: Run tests
run: mops test