Skip to content

ci: add CI script for pop-api tests and integration tests #1

ci: add CI script for pop-api tests and integration tests

ci: add CI script for pop-api tests and integration tests #1

Workflow file for this run

name: contract
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
integration-tests:

Check failure on line 10 in .github/workflows/contract.yml

View workflow run for this annotation

GitHub Actions / contract

Invalid workflow file

The workflow is not valid. .github/workflows/contract.yml (Line: 10, Col: 3): The workflow must contain at least one job with no dependencies.
env:
SUBCONTRACT_DIRECTORIES: "create_token_in_constructor fungibles"
CONTRACT_INTEGRATION_TESTS: pop-api/integration-tests
strategy:
matrix:
platform:
- macos-latest
- windows-latest
toolchain:
- stable
job:
- contract build
- test
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "./.github/actions/init"
- name: Download and run latest `substrate-contracts-node` binary
if: matrix.os == 'macOS-latest'
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 and run latest `substrate-contracts-node` binary
if: matrix.os == 'windows-latest'
run: |
cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --force --locked && \
substrate-contracts-node -lruntime::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: ${{ matrix.job }} integration-tests on ${{ matrix.platform }}-${{ matrix.toolchain }}
working-directory: ${{env.CONTRACT_INTEGRATION_TESTS}}
run: |
for contract in ${SUBCONTRACT_DIRECTORIES}; do
echo "Processing contract: $contract";
cargo ${{ matrix.job }} --release --manifest-path contracts/${contract}/Cargo.toml;
done