added chain validation #82
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: CI tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
env: | |
CARGO_TERM_COLOR: always | |
CARGO_NET_GIT_FETCH_WITH_CLI: true | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref_name }} | |
cancel-in-progress: true | |
jobs: | |
linting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: | | |
${{ secrets.MAMORU_CORE_KEY }} | |
${{ secrets.VALIDATION_CHAIN_KEY }} | |
- uses: ./.github/actions/install-deps | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: Swatinem/rust-cache@v2 | |
- name: Run linting | |
run: | | |
cargo fmt -- --check | |
cargo clippy --workspace --tests -- -D warnings -A clippy::non_canonical_clone_impl -A clippy::redundant_closure_call -A clippy::transmute-int-to-bool | |
build: | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: | | |
${{ secrets.MAMORU_CORE_KEY }} | |
${{ secrets.VALIDATION_CHAIN_KEY }} | |
- uses: ./.github/actions/install-deps | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build | |
run: cargo build -r --verbose | |
tests: | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: | | |
${{ secrets.MAMORU_CORE_KEY }} | |
${{ secrets.VALIDATION_CHAIN_KEY }} | |
- uses: ./.github/actions/install-deps | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run tests | |
run: make test | |
test-coverage: | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: | | |
${{ secrets.MAMORU_CORE_KEY }} | |
${{ secrets.VALIDATION_CHAIN_KEY }} | |
- uses: ./.github/actions/install-deps | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install cargo-llvm-cov | |
run: rustup update && cargo clean && cargo install cargo-llvm-cov --quiet | |
- name: Generate code coverage | |
run: cargo llvm-cov | |