diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 00000000..b432bf03 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,64 @@ +--- +name: Coverage + +on: + push: + branches: + - 'main' + +jobs: + check: + name: Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - uses: abelfodil/protoc-action@v1 + with: + protoc-version: '3.19.4' + - uses: actions-rs/cargo@v1 + with: + command: check + + test: + name: Test Suite + runs-on: ubuntu-latest + services: + infinispan: + image: infinispan/server:11.0.9.Final + ports: + - 11222:11222 + env: + USER: username + PASS: password + steps: + - uses: actions/checkout@v2 + - uses: supercharge/redis-github-action@1.1.0 + with: + redis-version: 5 + # Nightly is required for code coverage with doctests + # https://github.com/taiki-e/cargo-llvm-cov/issues/2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + - uses: abelfodil/protoc-action@v1 + with: + protoc-version: '3.19.4' + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + - name: Test and Generate code coverage + run: cargo +nightly llvm-cov --all-features --workspace --lcov --doctests --output-path lcov.info + - name: Codecov + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + if: env.CODECOV_TOKEN != null + uses: codecov/codecov-action@v3 + with: + verbose: true + fail_ci_if_error: false diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6612ea85..24e66682 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -50,23 +50,15 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: nightly + toolchain: stable override: true - uses: abelfodil/protoc-action@v1 with: protoc-version: '3.19.4' - - name: Install cargo-llvm-cov - uses: taiki-e/install-action@cargo-llvm-cov - - name: Test and Generate code coverage - run: cargo +nightly llvm-cov --all-features --workspace --lcov --doctests --output-path lcov.info - - name: Codecov - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - if: env.CODECOV_TOKEN != null - uses: codecov/codecov-action@v3 + - uses: actions-rs/cargo@v1 with: - verbose: true - fail_ci_if_error: false + command: test + args: --all-features -vv fmt: name: Rustfmt