diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..6cdadbb --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,28 @@ +on: + push: + branches: + - main + pull_request: + +name: coverage + +jobs: + check: + name: Rust project + runs-on: ubuntu-latest + container: + image: xd009642/tarpaulin:develop-nightly + options: --security-opt seccomp=unconfined + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Generate code coverage + run: | + cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --out xml + + - name: Upload to codecov.io + uses: codecov/codecov-action@v2 + # with: + # token: ${{secrets.CODECOV_TOKEN}} # not required for public repos + # fail_ci_if_error: true \ No newline at end of file diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c3bc7fd..447cd63 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -19,15 +19,3 @@ jobs: with: toolchain: stable override: true - - - name: Run cargo-tarpaulin - uses: actions-rs/tarpaulin@v0.1 - with: - version: '0.15.0' - - # Upload coverage report - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 - with: - file: ${{ steps.coverage.outputs.report }} - directory: ./coverage/reports/