Skip to content

Polkadot v1.0.0

Polkadot v1.0.0 #95

Workflow file for this run

name: CI/CD
on:
pull_request:
branches: [ main ]
jobs:
unit-tests:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Nix
uses: cachix/install-nix-action@v18
- name: Rustfmt check
run: nix develop -c cargo fmt --all --check
- name: Run tests with substrate-std
run: RUSTFLAGS="-D warnings" nix develop -c cargo test --workspace --features substrate-std
- name: Run tests with ink-std
run: RUSTFLAGS="-D warnings" nix develop -c cargo test --workspace --features ink-std
integration-tests:
name: Run integration tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Nix
uses: cachix/install-nix-action@v18
- name: Download OBCE test environment
run: git clone https://github.com/727-Ventures/obce-test-environment
- name: Bootstrap OBCE test environment
working-directory: ./obce-test-environment
run: |
rm -rf .git
nix develop -c cargo build
./target/debug/substrate-contracts-node --tmp --dev &
- name: Install cargo-contract
run: nix develop -c cargo install cargo-contract --git https://github.com/paritytech/cargo-contract
- name: Run yarn
run: nix develop -c yarn
- name: Build test contract
working-directory: ./tests/e2e/contract
run: nix develop -c cargo contract build
- name: Copy artifacts
run: |
mkdir artifacts
cp ./tests/e2e/contract/target/ink/contract.contract artifacts/
cp ./tests/e2e/contract/target/ink/contract.json artifacts/
- name: Run Typechain compiler
run: nix develop -c yarn build:release:no-compile
- name: Run tests
run: nix develop -c yarn test:mocha