-
Notifications
You must be signed in to change notification settings - Fork 612
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
1 changed file
with
33 additions
and
23 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 |
---|---|---|
|
@@ -12,32 +12,42 @@ env: | |
MSRV: 1.46.0 | ||
|
||
jobs: | ||
backend: | ||
name: Backend | ||
runs-on: ubuntu-18.04 | ||
|
||
env: | ||
CARGO_INCREMENTAL: 0 | ||
RUSTFLAGS: "-C debuginfo=0 -D warnings" | ||
|
||
check: | ||
name: Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: rustup override set ${{env.MSRV}} | ||
- uses: Swatinem/[email protected] | ||
- run: cargo check --workspace --all-targets | ||
env: | ||
RUSTFLAGS: "-D warnings" | ||
|
||
- name: Install Rust v${{ env.MSRV }} | ||
run: | | ||
rustup default ${{ env.MSRV }} | ||
- name: Install lint tools | ||
run: | | ||
rustup component add rustfmt | ||
rustup component add clippy | ||
tests: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: rustup override set ${{env.MSRV}} | ||
- uses: Swatinem/[email protected] | ||
- run: cargo test --workspace | ||
|
||
- name: Lint | ||
run: | | ||
cargo fmt -- --check | ||
cargo clippy --all-targets --all-features --all | ||
fmt: | ||
name: Rustfmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: rustup override set ${{env.MSRV}} | ||
- run: rustup component add rustfmt | ||
- uses: Swatinem/[email protected] | ||
- run: cargo fmt --all -- --check | ||
|
||
- name: Test | ||
run: cargo test | ||
clippy: | ||
name: Clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: rustup override set ${{env.MSRV}} | ||
- run: rustup component add clippy | ||
- uses: Swatinem/[email protected] | ||
- run: cargo clippy --workspace -- --deny warnings |