-
Notifications
You must be signed in to change notification settings - Fork 6
49 lines (41 loc) · 1.73 KB
/
contract.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: contract
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
integration-tests:
env:
SUBCONTRACT_DIRECTORIES: "create_token_in_constructor fungibles"
CONTRACT_INTEGRATION_TESTS: pop-api/integration-tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "./.github/actions/init"
- name: Download and run latest `substrate-contracts-node` binary
run: |
curl -L -o substrate-contracts-node.zip 'https://gitlab.parity.io/parity/mirrors/substrate-contracts-node/-/jobs/artifacts/main/download?job=build-mac' && \
unzip substrate-contracts-node.zip && \
chmod +x artifacts/substrate-contracts-node-mac/substrate-contracts-node &&
./artifacts/substrate-contracts-node-mac/substrate-contracts-node -linfo,runtime::contracts=debug 2>&1 | tee /tmp/contracts-node.log &
- name: Install `cargo-contract` `master`
uses: baptiste0928/cargo-install@9f6037ed331dcf7da101461a20656273fa72abf0 # v3.1.0
with:
crate: cargo-contract
git: https://github.com/use-ink/cargo-contract.git
branch: master
- name: Output versions
run: |
cargo -vV
cargo contract --version
- name: Build contracts
working-directory: ${{env.CONTRACT_INTEGRATION_TESTS}}
run: |
for contract in ${SUBCONTRACT_DIRECTORIES}; do
echo "Processing contract: $contract";
cargo contract build --release --manifest-path contracts/${contract}/Cargo.toml;
done
- name: Run integration tests
working-directory: ${{env.CONTRACT_INTEGRATION_TESTS}}
run: cargo test