diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index dc8b628..526fd53 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,17 +10,37 @@ jobs: name: Check code with rustfmt and clippy runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Check code with rustfmt - run: cargo fmt --check - - name: Check code with clippy - run: cargo clippy + - uses: actions/checkout@v4 + - name: Check code with rustfmt + run: cargo fmt --check + - name: Check code with clippy + run: cargo clippy test: name: Build and run tests + needs: check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Build library - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose + - uses: actions/checkout@v4 + - name: Build library + run: cargo build --verbose + - name: Run tests + run: RUST_BACKTRACE=1 cargo test --verbose + coverage: + name: coverage + needs: test + if: github.event_name == 'push' + runs-on: ubuntu-latest + container: + image: xd009642/tarpaulin:develop-nightly + options: --security-opt seccomp=unconfined + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Generate code coverage + run: | + cargo +nightly tarpaulin --verbose --all-features --engine llvm --out xml + - name: Upload to codecov.io + uses: codecov/codecov-action@v4 + with: + token: ${{secrets.CODECOV_TOKEN}} + fail_ci_if_error: true diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml deleted file mode 100644 index 8f0daee..0000000 --- a/.github/workflows/coverage.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: coverage - -on: [push] -jobs: - test: - name: coverage - 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 --out xml - - - name: Upload to codecov.io - uses: codecov/codecov-action@v2 - with: - token: ${{secrets.CODECOV_TOKEN}} - fail_ci_if_error: true