-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use GitHub Action instead of Travis CI to reduce the total time CI takes
- Loading branch information
1 parent
e93d9d1
commit 4808826
Showing
5 changed files
with
90 additions
and
63 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,85 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
name: Test | ||
|
||
jobs: | ||
run-test: | ||
runs-on: ${{ matrix.os }} | ||
continue-on-error: ${{ matrix.ignore-err }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
toolchain: [stable] | ||
ignore-err: [false] | ||
coverage: [false] | ||
include: | ||
- os: ubuntu-latest | ||
toolchain: nightly | ||
ignore-err: true | ||
coverage: true | ||
- os: macos-latest | ||
toolchain: nightly | ||
ignore-err: true | ||
coverage: false | ||
steps: | ||
- uses: actions/checkout@v2 | ||
name: Checkout 🛎️ | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: ${{ runner.os }}-cargo-test | ||
- uses: actions-rs/toolchain@v1 | ||
name: Setup Cargo Toolchain 🛎️ | ||
with: | ||
components: rustfmt, clippy | ||
toolchain: ${{ matrix.toolchain }} | ||
override: true | ||
default: true | ||
- uses: actions-rs/cargo@v1 | ||
name: Check Code Format 🔧 | ||
with: | ||
command: fmt | ||
args: -- --check | ||
- uses: actions-rs/cargo@v1 | ||
name: Run Cargo Clippy 🔧 | ||
with: | ||
command: clippy | ||
args: -- -D warnings | ||
- uses: actions-rs/cargo@v1 | ||
name: Running Tests 🚀 | ||
with: | ||
command: test | ||
args: --all | ||
- uses: actions-rs/cargo@v1 | ||
name: Cargo Clean | ||
if: ${{ matrix.coverage }} | ||
with: | ||
command: clean | ||
- uses: actions-rs/cargo@v1 | ||
name: Tests with coverage reports 🚀 | ||
if: ${{ matrix.coverage }} | ||
with: | ||
command: test | ||
args: --all-features --no-fail-fast | ||
env: | ||
CARGO_INCREMENTAL: "0" | ||
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests" | ||
RUSTDOCFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests" | ||
- id: coverage | ||
if: ${{ matrix.coverage }} | ||
uses: actions-rs/[email protected] | ||
- name: Coveralls upload 📕 | ||
if: ${{ matrix.coverage }} | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
file: ${{ steps.coverage.outputs.report }} |
This file was deleted.
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
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