bump moc and ic-cdk #664
Workflow file for this run
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: Backend | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
paths: | |
- 'service/**' | |
- '.github/workflows/backend.yml' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
env: | |
DFX_VERSION: 0.18.0-beta.3 | |
IC_REPL_VERSION: 0.6.2 | |
MOC_VERSION: 0.11.0 | |
steps: | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
target: wasm32-unknown-unknown | |
- name: Cache cargo build | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
service/wasm-utils/target | |
key: cargo-${{ hashFiles('**/Cargo.lock') }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install dfx | |
uses: dfinity/setup-dfx@main | |
with: | |
dfx-version: ${{ env.DFX_VERSION }} | |
- name: Install dfx dependencies | |
run: | | |
wget https://github.com/chenyan2002/ic-repl/releases/download/$IC_REPL_VERSION/ic-repl-linux64 | |
cp ./ic-repl-linux64 /usr/local/bin/ic-repl | |
chmod a+x /usr/local/bin/ic-repl | |
npm i -g ic-mops | |
dfx cache install | |
cd $(dfx cache show) | |
wget https://github.com/dfinity/motoko/releases/download/$MOC_VERSION/motoko-Linux-x86_64-$MOC_VERSION.tar.gz | |
tar zxvf motoko-Linux-x86_64-$MOC_VERSION.tar.gz | |
- name: Start dfx | |
run: | | |
dfx start --background | |
- name: Checkout base branch | |
if: github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'breaking_changes') | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.base_ref }} | |
- name: Deploy main branch | |
if: github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'breaking_changes') | |
run: | | |
dfx deploy backend | |
- uses: actions/checkout@v4 | |
- name: Deploy current branch | |
run: dfx deploy backend | |
- name: CanisterPool test | |
run: | | |
(for f in service/pool/tests/*.test.sh; do | |
echo "==== Run test $f ====" | |
ic-repl "$f" || exit | |
done) | |
- name: Actor class test | |
run: | | |
cd ./service/pool/tests/actor_class | |
dfx canister create --all | |
dfx build | |
ic-repl ./test.sh | |
- name: Stop dfx | |
run: dfx stop |