feat(cli): add mops deployed post-deploy hook + init bootstrap (#…
#1726
This file contains hidden or 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: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| strategy: | |
| max-parallel: 4 | |
| fail-fast: false | |
| matrix: | |
| mops-version: | |
| [ | |
| ./cli/dist, | |
| ic-mops, | |
| ic-mops@1.0.0, | |
| "https://cli.mops.one/versions/latest.tgz", | |
| ] | |
| moc-version: [0.14.13] | |
| node-version: [22, 24] | |
| runner: [ubuntu-latest] | |
| runs-on: ${{ matrix.runner }} | |
| name: ${{ matrix.runner }}, node ${{ matrix.node-version }}, moc ${{ matrix.moc-version }}, ${{ matrix.mops-version }} | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: "npm" | |
| - uses: dfinity/setup-dfx@e50c04f104ee4285ec010f10609483cf41e4d365 # main | |
| - run: dfx cache install | |
| - name: Cache mops packages | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | |
| 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 | |
| - uses: ./.github/actions/cache-rust-wasm | |
| if: ${{ matrix.mops-version == './cli/dist' }} | |
| - name: Install and build local cli | |
| if: ${{ matrix.mops-version == './cli/dist' }} | |
| run: cd cli && npm ci | |
| - 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 | |
| ci-ok-mops: | |
| if: always() | |
| needs: [test] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') | |
| run: exit 1 |