-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add CI workflows for clippy, fmt and test. * Fix cargo format and clippy errors * Fix clippy errors.
- Loading branch information
1 parent
8ea9432
commit e30719a
Showing
7 changed files
with
78 additions
and
4 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,24 @@ | ||
name: release | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
jobs: | ||
check-version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Check version | ||
run: | | ||
TAG_VERSION=$(echo ${GITHUB_REF#refs/tags/v}) | ||
CRATE_VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version') | ||
test "$TAG_VERSION" = "$CRATE_VERSION" | ||
publish: | ||
runs-on: ubuntu-latest | ||
needs: check-version | ||
env: | ||
CARGO_REGISTRY_TOKEN: "${{ secrets.CARGO_REGISTRY_TOKEN }}" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Publish crate | ||
run: cargo publish -p milhouse |
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,44 @@ | ||
name: test-suite | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- 'pr/*' | ||
pull_request: | ||
env: | ||
# Deny warnings in CI | ||
RUSTFLAGS: "-D warnings" | ||
jobs: | ||
cargo-fmt: | ||
name: cargo-fmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Get latest version of stable Rust | ||
run: rustup update stable | ||
- name: Check formatting with cargo fmt | ||
run: cargo fmt --all -- --check | ||
clippy: | ||
name: clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Get latest version of stable Rust | ||
run: rustup update stable | ||
- name: Lint code for quality and style with Clippy | ||
run: cargo clippy --all | ||
test: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
name: test-${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Get latest version of stable Rust | ||
run: rustup update stable | ||
- name: Run tests | ||
run: cargo test --release | ||
- name: Check all examples, binaries, etc | ||
run: cargo check --all-targets |
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 |
---|---|---|
|
@@ -2,3 +2,6 @@ | |
Cargo.lock | ||
|
||
/proptest-regressions | ||
|
||
# IntelliJ / Clion | ||
.idea |
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
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
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
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