-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #79 from baoyachi/github_action_ci
update github workflows ci
- Loading branch information
Showing
2 changed files
with
44 additions
and
24 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 |
---|---|---|
|
@@ -69,3 +69,47 @@ jobs: | |
override: true | ||
- name: Build on nightly | ||
run: cargo build --release | ||
|
||
test: | ||
strategy: | ||
matrix: | ||
rust: [stable, beta, nightly] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Rust | ||
uses: hecrj/setup-rust-action@v1 | ||
with: | ||
rust-version: ${{ matrix.rust }} | ||
- name: Install Tarpaulin | ||
uses: actions-rs/[email protected] | ||
with: | ||
crate: cargo-tarpaulin | ||
version: 0.14.2 | ||
use-tool-cache: true | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Test | ||
run: | | ||
cargo test --all-features | ||
cargo test --examples | ||
- name: Coverage | ||
if: matrix.rust == 'stable' | ||
run: cargo tarpaulin -o Lcov --output-dir ./coverage | ||
- name: Coveralls | ||
if: matrix.rust == 'stable' | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
publish-crate: | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
runs-on: ubuntu-latest | ||
needs: [test] | ||
steps: | ||
- name: Set up Rust | ||
uses: hecrj/setup-rust-action@v1 | ||
- uses: actions/checkout@v2 | ||
- name: Publish | ||
shell: bash | ||
run: | | ||
cargo publish --token ${{ secrets.CRATES_GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.