Merge pull request #138 from ZenVoich/feat/file-stats #259
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |