Skip to content

CI tests

CI tests #70

Workflow file for this run

name: CI
on:
merge_group:
push:
branches: [main]
pull_request:
branches: ["*"]
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
compile:
name: Compile
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Rustup toolchain install
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: wasm32-unknown-unknown
- name: Run cargo check
run: cd tests && cargo check
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy
- name: Run cargo fmt
run: cd tests && cargo fmt --all -- --check
- name: Run clippy
run: cd tests && cargo clippy --all-targets --all-features -- -D warnings
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Setup Era test node
run: make setup
- name: Copy our precompiles to era-test-node system contracts
run: cp -r precompiles/ submodules/era-test-node/etc/system-contracts/contracts/precompiles
- name: Build precompiles
working-directory: submodules/era-test-node
run: make build-precompiles
- name: Start era-test-node (Persistent)
working-directory: submodules/era-test-node
# The usage of `nohup ... &` guarantees that the server will keep on
# running after
run: nohup cargo run -- --show-calls=all --resolve-hashes run > era-test-node.log 2>&1 &
- name: Run tests # FIXME run the tests for real
run: sleep 1m && false # Simulate a failure
# Make the Era logs available us.
- name: Print era-test-node logs
# Yes, I'm aware that using `always()` will execute this step regardless of
# whether the job was canceled. However, this is not an issue since it's
# just a `cat` command.
if: allways()

Check failure on line 86 in .github/workflows/ci.yaml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yaml (Line: 86, Col: 13): Unrecognized function: 'allways'. Located at position 1 within expression: allways()
run: cat era-test-node.log