Skip to content

Commit

Permalink
Conditionally compile v2 upgrade module for v1 testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Bargsteen committed Oct 9, 2023
1 parent f477fdb commit ad9c6c8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -808,8 +808,8 @@ jobs:
- examples/signature-verifier
- examples/transfer-policy-check
- examples/two-step-transfer
- examples/smart-contract-upgrade/contract-version2 # TODO: Will the produced wasm file exist in the v1 run below?
- examples/smart-contract-upgrade/contract-version1
- examples/smart-contract-upgrade/contract-version2
- examples/offchain-transfers
- examples/account-signature-checks

Expand All @@ -830,5 +830,10 @@ jobs:
- name: Install wasm target and Cargo Concordium
run: rustup target install wasm32-unknown-unknown && cargo install --locked cargo-concordium

# The 'smart-contract-upgrade' example has a v1 and v2 contract and the tests in v1 needs the wasm module from v2 for upgrading.
- name: Build contract-upgrade version 2 module if needed
if: ${{ matrix.crates == 'examples/smart-contract-upgrade/contract-version1' }}
run: cargo concordium build --out "examples/smart-contract-upgrade/contract-version2/concordium-out/module.wasm.v1" -- --manifest-path "examples/smart-contract-upgrade/contract-version2/Cargo.toml"

- name: Run cargo concordium test
run: cargo concordium test --out "${{ matrix.crates }}/concordium-out/module.wasm.v1" -- --manifest-path "${{ matrix.crates }}/Cargo.toml"

0 comments on commit ad9c6c8

Please sign in to comment.