Skip to content

Commit

Permalink
Merge pull request #79 from baoyachi/github_action_ci
Browse files Browse the repository at this point in the history
update github workflows ci
  • Loading branch information
baoyachi committed Feb 22, 2022
2 parents 91c3d5a + 4c20ef5 commit 1daf34a
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 24 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/install@v0.1
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 }}
24 changes: 0 additions & 24 deletions .github/workflows/publish.yml

This file was deleted.

0 comments on commit 1daf34a

Please sign in to comment.