Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check test coverage #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ jobs:
- 6379:6379
options: --entrypoint redis-server

env:
NO_REDIS: 1
RUST_TEST_THREADS: 1
SAMPLE_COUNT: 10

steps:
- uses: actions/checkout@v1
- name: Build
Expand All @@ -23,22 +28,30 @@ jobs:
- name: Run tests (with items)
run: cargo test --verbose
env:
NO_REDIS: 1
RUST_TEST_THREADS: 1
SAMPLE_COUNT: 10000
- name: Run tests (without items)
run: cargo test --verbose
env:
NO_REDIS: 1
SAMPLE_COUNT: 0
RUST_TEST_THREADS: 1
- name: Install nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Test nightly (with readme)
run: cargo test --verbose --features readme
- name: Test for coverage
uses: actions-rs/cargo@v1
with:
command: test
args: --no-fail-fast
env:
NO_REDIS: 1
SAMPLE_COUNT: 10
RUST_TEST_THREADS: 1
CARGO_INCREMENTAL: 0
RUSTFLAGS: -Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads
- name: Get coverage
uses: actions-rs/[email protected]
- name: Coveralls upload
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ${{ steps.coverage.outputs.report }}