-
Notifications
You must be signed in to change notification settings - Fork 2
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
69 additions
and
40 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,71 +1,89 @@ | ||
name: Continuous Integration | ||
|
||
name: ci | ||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
push: | ||
branches: [ master ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
RUST_BACKTRACE: full | ||
|
||
jobs: | ||
unit-tests: | ||
name: unit tests | ||
rustfmt: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
timeout-minutes: 10 | ||
env: | ||
RUSTFLAGS: "-D warnings" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: unit tests | ||
uses: actions-rs/cargo@v1 | ||
- uses: actions/checkout@v3 | ||
- name: Setup Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
command: test | ||
args: --verbose --workspace -- --nocapture | ||
toolchain: stable | ||
components: rustfmt | ||
|
||
rustfmt: | ||
name: rustfmt | ||
- name: Cache rust cargo build files | ||
uses: Leafwing-Studios/cargo-cache@v1 | ||
|
||
- run: cargo fmt --all -- --check | ||
|
||
clippy: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
timeout-minutes: 20 | ||
env: | ||
RUSTFLAGS: "-D warnings" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: rustfmt | ||
uses: actions-rs/cargo@v1 | ||
- uses: actions/checkout@v3 | ||
- name: Setup Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
toolchain: stable | ||
components: clippy | ||
|
||
clippy: | ||
name: clippy | ||
- name: Cache rust cargo build files | ||
uses: Leafwing-Studios/cargo-cache@v1 | ||
|
||
- run: cargo clippy --all --all-targets --all-features | ||
|
||
release-check: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
env: | ||
RUSTFLAGS: "-D warnings" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: clippy | ||
uses: actions-rs/cargo@v1 | ||
- uses: actions/checkout@v3 | ||
- name: Setup Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
command: clippy | ||
toolchain: stable | ||
|
||
release-check: | ||
name: release check | ||
- name: Cache rust cargo build files | ||
uses: Leafwing-Studios/cargo-cache@v1 | ||
|
||
- name: check (release) | ||
run: cargo check --release --all --all-targets --all-features | ||
|
||
tests: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
env: | ||
RUSTFLAGS: "-D warnings" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: release check | ||
uses: actions-rs/cargo@v1 | ||
- uses: actions/checkout@v3 | ||
- name: Setup Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
command: check | ||
args: --release | ||
toolchain: stable | ||
|
||
- name: Cache rust cargo build files | ||
uses: Leafwing-Studios/cargo-cache@v1 | ||
|
||
- name: Unit tests | ||
run: cargo test --verbose --workspace --lib -- --nocapture | ||
|
||
- name: Integration tests | ||
run: cargo test --verbose --workspace --tests '*' -- --nocapture |
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,2 +1,13 @@ | ||
/target | ||
/Cargo.lock | ||
## IDEs and Editors | ||
.idea/ | ||
.vscode/ | ||
|
||
## Rust | ||
debug/ | ||
target/ | ||
**/*.rs.bk | ||
Cargo.lock | ||
*.pdb | ||
|
||
## Project | ||
test-outputs/ |