Add GH actions workflow #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: babylonchain/babylon-contract/local-tests | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
local-build-test: | |
runs-on: ubuntu-latest | |
container: | |
image: rust:1.78.0 | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up Rust environment | |
run: rustup component add rustfmt clippy | |
- name: Build Babylon contracts | |
run: cargo build | |
- name: Test generating schema | |
run: |- | |
(cd ./contracts/babylon && cargo run --bin schema) | |
(cd ./contracts/btc-staking && cargo run --bin btcstaking-schema) | |
- name: Check formats and run unit tests | |
run: cargo test --lib |