-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
154 additions
and
36 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,59 @@ | ||
name: CI | ||
|
||
run-name: "CI run '${{ github.head_ref || github.ref_name }}'" | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
merge_group: | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
ci: | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest"] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cache | ||
id: rust-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml', '.github/workflows/*.yml') }} | ||
|
||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: 1.75.0 | ||
components: rustfmt, clippy | ||
default: true | ||
|
||
- name: Install cargo-deny | ||
if: steps.rust-cache.outputs.cache-hit != 'true' | ||
run: rustup run --install 1.70 cargo install --force --version 0.14.3 cargo-deny --locked | ||
|
||
- name: Compile | ||
run: cargo build --all-targets --all-features | ||
|
||
- name: Run tests | ||
run: make test | ||
|
||
- name: Clippy | ||
run: cargo clippy --all --all-targets -- -Dwarnings | ||
|
||
- name: Format | ||
run: cargo fmt --all -- --check |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# This command builds the project, including all targets, and generates the documentation. | ||
build: check | ||
cargo build --all-targets | ||
cargo doc | ||
|
||
# This command checks the licenses of all dependencies, formats the code, and runs the Clippy linter. | ||
check: | ||
cargo deny --all-features check licenses | ||
cargo fmt --all -- --check | ||
cargo clippy --all --all-targets | ||
|
||
# This command runs the tests with backtrace enabled. | ||
test: check | ||
RUST_BACKTRACE=1 cargo test |
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,23 @@ | ||
# Configuration documentation: | ||
# https://embarkstudios.github.io/cargo-deny/index.html | ||
|
||
[advisories] | ||
vulnerability = "deny" | ||
yanked = "deny" | ||
unmaintained = "warn" | ||
notice = "warn" | ||
ignore = [ | ||
] | ||
git-fetch-with-cli = true | ||
|
||
[licenses] | ||
allow-osi-fsf-free = "either" | ||
copyleft = "warn" | ||
unlicensed = "deny" | ||
default = "deny" | ||
confidence-threshold = 0.8 | ||
|
||
|
||
[bans] | ||
multiple-versions = "warn" | ||
highlight = "all" |
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
Oops, something went wrong.