Skip to content

Commit

Permalink
ci: run check on all pull requests into network branches
Browse files Browse the repository at this point in the history
  • Loading branch information
hrls committed Oct 8, 2024
1 parent 3fb8c47 commit 92654f0
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,53 @@ name: Check

on:
workflow_dispatch:
# push:
# branches: [ "devnet" ]
pull_request:
branches: [ "devnet" ]
branches:
- devnet
- testnet
- stagenet
- mainnet

env:
CARGO_TERM_COLOR: always

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: wasm32-unknown-unknown
components: rustfmt clippy rust-src

- name: Install system deps
run: sudo apt-get install protobuf-compiler jq ripgrep shellcheck fd-find

- name: Build
run: cargo build --locked

- name: Run tests
run: cargo test --locked

- name: Check format
run: |
rustup toolchain add nightly-x86_64-unknown-linux-gnu
rustup component add --toolchain nightly-x86_64-unknown-linux-gnu rustfmt
cargo +nightly fmt -- --check
- name: Clippy checks
run: cargo clippy --all-targets -- --deny warnings

- name: Clippy checks all features (exclude node and runtime)
run: |
set -o pipefail
cargo metadata --format-version=1 --no-deps \
| jq '.packages | .[] | .name' \
| rg --invert-match 'atleta-(node|runtime)' \
| xargs -I {} cargo clippy --package {} --all-targets --all-features -- --deny warnings --deny missing_docs
- name: Run shellcheck
run: fdfind --type executable --exec bash -c 'echo {}; shellcheck {}'

0 comments on commit 92654f0

Please sign in to comment.