-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Setup Github actions to run tests
- Loading branch information
1 parent
aa82529
commit 2613786
Showing
1 changed file
with
68 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: CI # Continuous Integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: # Only re-run for code changes | ||
- "**.md" | ||
pull_request: | ||
paths-ignore: # Only re-run for code changes | ||
- "**.md" | ||
|
||
jobs: | ||
test: | ||
name: Test Suite | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: rustfmt | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Run tests | ||
run: cargo test --workspace | ||
|
||
rustfmt: | ||
name: Rustfmt | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: rustfmt | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Check formatting | ||
run: cargo fmt --all --check | ||
|
||
clippy: | ||
name: Clippy | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: rustfmt | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Clippy Check | ||
run: cargo clippy --all-targets --all-features --workspace -- -D warnings | ||
|
||
docs: | ||
name: Docs | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Check documentation | ||
env: | ||
RUSTDOCFLAGS: -D warnings | ||
run: cargo doc --no-deps --document-private-items --all-features --workspace --examples |