-
Notifications
You must be signed in to change notification settings - Fork 0
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
2 changed files
with
54 additions
and
9 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 |
---|---|---|
@@ -1,22 +1,52 @@ | ||
# Rust template: https://github.com/actions/starter-workflows/blob/main/ci/rust.yml | ||
# Resources: https://docs.github.com/en/actions | ||
# Examples: https://github.com/actions/starter-workflows | ||
# Process: make small changes, push them, check the Actions tab on github | ||
# also see templates https://github.com/rust-github/template/tree/main/.github/workflows | ||
name: Rust | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
CARGO_TERM_COLOR: always # pretty colors | ||
|
||
jobs: | ||
build: | ||
|
||
lint: | ||
name: lint project | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
toolchain: | ||
- nightly | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | ||
- run: rustup component add clippy | ||
- run: cargo clippy -- -Dwarnings | ||
test: | ||
name: test project | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
toolchain: | ||
- nightly | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | ||
- run: cargo test --all-features --verbose | ||
|
||
fmt: | ||
name: fmt project | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
toolchain: | ||
- nightly | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build | ||
run: cargo build --verbose | ||
- name: Run tests | ||
run: cargo test --verbose | ||
- uses: actions/checkout@v4 | ||
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | ||
- run: rustup component add rustfmt | ||
- run: cargo fmt --all -- --check |
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,15 @@ | ||
# rustup toolchain config. We typically use nightly to enable better formatting and async support. | ||
# https://rust-lang.github.io/rustup/overrides.html | ||
|
||
[toolchain] | ||
# what toolchain to use. | ||
channel="nightly" | ||
|
||
# option to specify a date to pin to a particular release | ||
# date = "2024-03-19" | ||
|
||
# profiles are groups of components to download when installing a toolchain. | ||
# https://rust-lang.github.io/rustup/concepts/profiles.html | ||
# "minimal" includes only the compiler, package manager, and standard lib. | ||
# "default" further includes the formatter, linter, and documentation generator. | ||
profile="default" |