Skip to content

Commit

Permalink
Merge pull request #7 from 0xPolygonZero/add-lint-ci-jobs
Browse files Browse the repository at this point in the history
chore: add the test, rustfmt and clippy jobs.
  • Loading branch information
muursh authored Apr 17, 2024
2 parents 2ac5e3d + 535781b commit 52ee951
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/cI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Continuous Integration

on:
push:
branches:
- main
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always

jobs:
clippy:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- run: cargo clippy --workspace --all-targets --all-features
env:
RUSTFLAGS: -Dwarnings

rustfmt:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: cargo fmt --all --check

test:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- run: cargo test --workspace

0 comments on commit 52ee951

Please sign in to comment.