-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github-workflows: Improve GitHub Workflow tests.
- Loading branch information
Showing
1 changed file
with
27 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,14 +1,32 @@ | ||
name: Rust | ||
|
||
name: Test hex | ||
on: [push, pull_request] | ||
|
||
env: | ||
RUST_BACKTRACE: '1' | ||
RUSTFLAGS: -D warnings | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
# We want the tests to run on all configurations, even if jobs (like on nightly), fail. | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
rust: [stable, beta, nightly] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Build | ||
run: cargo build --verbose | ||
- name: Run tests | ||
run: cargo test --verbose | ||
- uses: actions/checkout@v2 | ||
- uses: hecrj/setup-rust-action@v1 | ||
with: | ||
rust-version: ${{ matrix.rust }} | ||
- name: Build | ||
run: cargo build --verbose | ||
- name: Run tests | ||
run: cargo test --verbose | ||
- name: Run tests [no-default-features] | ||
run: cargo test --verbose --no-default-features | ||
- name: Run tests [serde] | ||
run: cargo test --verbose --features serde | ||
- name: Validate benches still work | ||
run: cargo bench --all -- --test |