build(deps): bump ic-cdk from 0.20.1 to 0.20.2 (#131) #499
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: 'CI' | |
| on: | |
| pull_request: | |
| merge_group: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - v* | |
| paths-ignore: | |
| - "README.md" | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: "-Dwarnings" | |
| PROXY_CANISTER_VERSION: "v0.1.0" | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 'Checkout' | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - name: 'Run clippy' | |
| run: cargo clippy --locked --all-targets --all-features -- -D clippy::all | |
| - name: 'Run rustfmt' | |
| run: cargo fmt --all -- --check | |
| - name: 'Install cargo-sort' | |
| run: cargo install cargo-sort | |
| - name: 'Check Cargo.toml' | |
| run: cargo sort --workspace --check | |
| cargo-doc: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - name: Cargo doc | |
| run: | | |
| cargo doc --workspace --no-deps | |
| env: | |
| RUSTDOCFLAGS: "--deny warnings" | |
| unit-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 'Checkout' | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - name: 'Run unit tests' | |
| run: cargo test --locked --workspace --exclude http_canister --exclude json_rpc_canister --exclude multi_canister | |
| integration-tests: | |
| runs-on: ubuntu-latest | |
| services: | |
| httpbin: | |
| image: kennethreitz/httpbin | |
| ports: | |
| - 80:80 | |
| env: | |
| HTTPBIN_URL: http://localhost | |
| steps: | |
| - name: 'Checkout' | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - name: 'Build example canisters' | |
| run: | | |
| cargo build -p http_canister -p json_rpc_canister -p multi_canister --target wasm32-unknown-unknown --release --locked | |
| - name: 'Set WASM paths for load_wasm' | |
| run: | | |
| echo "HTTP_CANISTER_WASM_PATH=$GITHUB_WORKSPACE/target/wasm32-unknown-unknown/release/http_canister.wasm" >> "$GITHUB_ENV" | |
| echo "JSON_RPC_CANISTER_WASM_PATH=$GITHUB_WORKSPACE/target/wasm32-unknown-unknown/release/json_rpc_canister.wasm" >> "$GITHUB_ENV" | |
| echo "MULTI_CANISTER_WASM_PATH=$GITHUB_WORKSPACE/target/wasm32-unknown-unknown/release/multi_canister.wasm" >> "$GITHUB_ENV" | |
| - name: 'Download proxy canister WASM' | |
| run: | | |
| PROXY_CANISTER_WASM_PATH=$GITHUB_WORKSPACE/target/test-artifacts | |
| mkdir -p $PROXY_CANISTER_WASM_PATH | |
| curl -L "https://github.com/dfinity/proxy-canister/releases/download/${PROXY_CANISTER_VERSION}/proxy.wasm" -o "${PROXY_CANISTER_WASM_PATH}/proxy.wasm" | |
| echo "PROXY_CANISTER_WASM_PATH=${PROXY_CANISTER_WASM_PATH}/proxy.wasm" >> $GITHUB_ENV | |
| - name: 'Install PocketIC server' | |
| uses: dfinity/pocketic@20c33db1aa87cc6ece50857ac632c37acf5e0322 # main | |
| with: | |
| pocket-ic-server-version: "13.0.0" | |
| - name: 'Run integration tests' | |
| run: cargo test --locked -p http_canister -p json_rpc_canister | |
| # Single aggregator status check. Configure GitHub branch protection | |
| # to require `checks-pass` so that any failing, cancelled, or skipped | |
| # upstream job blocks the merge, without having to enumerate every | |
| # individual job in the ruleset. | |
| checks-pass: | |
| # Always run this job! | |
| if: always() | |
| needs: | |
| [ | |
| lint, | |
| cargo-doc, | |
| unit-tests, | |
| integration-tests, | |
| ] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: | | |
| if [[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }}" == "true" ]]; then | |
| exit 1 | |
| fi |