-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gh-actions: Add initial CI workflow to cover basic linting checks and…
… unit testing. (#1)
- Loading branch information
1 parent
383a467
commit 110096f
Showing
1 changed file
with
40 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,40 @@ | ||
name: "CI" | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: "${{github.workflow}}-${{github.ref}}" | ||
# Cancel in-progress jobs for efficiency | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: ["macos-latest", "ubuntu-latest"] | ||
runs-on: "${{matrix.os}}" | ||
steps: | ||
- uses: "actions/checkout@v4" | ||
|
||
- name: "Install Rust toolchain" | ||
run: rustup show | ||
|
||
- name: "Install Rust fmt toolchain" | ||
run: rustup component add rustfmt | ||
|
||
- name: "Install cargo nextest" | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
tool: cargo-nextest | ||
|
||
- name: "Cargo fmt" | ||
run: cargo fmt --all --check | ||
|
||
- name: "Cargo check" | ||
run: cargo check | ||
|
||
- name: "Cargo test" | ||
run: cargo nextest run --all-features |