Skip to content

Commit

Permalink
Add GHA CI job to run build, fmt, clippy, and test
Browse files Browse the repository at this point in the history
This commit adds a CI job to github actions that will run pre and post
merge on any branch to run cargo build, cargo fmt, cargo clippy, and
cargo test. This will ensure that any proposed change to rustiq-core
will pass all of these checks to ensure the repo can always build, pass
all the tests, and is following standard best practices for rust
development.

We shouldn't add this CI job until #2 merges because CI won't pass
clippy without that.
  • Loading branch information
mtreinish authored and smartiel committed Nov 6, 2024
1 parent f08681a commit ee382fe
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Cargo Build & Test

on:
push:
pull_request:

env:
CARGO_TERM_COLOR: always

jobs:
build_and_test:
name: Rust project - latest
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v4
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: cargo build --verbose
- run: cargo fmt --all -- --check
- run: cargo clippy --all-targets -- -D warnings
- run: cargo test --verbose

0 comments on commit ee382fe

Please sign in to comment.