Skip to content

Commit

Permalink
Merge pull request #5 from gluxon/wip/ernestask/coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
gluxon authored May 7, 2022
2 parents 5eac505 + 04659f6 commit b7cd1e5
Showing 1 changed file with 34 additions and 7 deletions.
41 changes: 34 additions & 7 deletions .github/workflows/primary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ on:
schedule:
- cron: "0 0 * * 6"
push:
branches: ["*"]
pull_request:
branches: [main]
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

jobs:
clippy:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
Expand All @@ -38,14 +38,41 @@ jobs:
timeout-minutes: 10
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04]
os: [ubuntu-20.04, ubuntu-22.04]
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1
- name: Build
run: cargo build --tests --verbose
- name: Run tests
run: cargo test --verbose
- uses: actions-rs/toolchain@v1
with:
components: llvm-tools-preview
override: true
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --no-fail-fast
env:
LLVM_PROFILE_FILE: "nldl-%p-%m.profraw"
RUSTFLAGS: '-Cinstrument-coverage'
- uses: actions-rs/cargo@v1
with:
command: install
args: grcov
- id: coverage
run: |
grcov \
--branch \
--ignore-not-existing \
--llvm \
--binary-path=target/debug/ \
--output-path=target/debug/lcov.info \
--output-type=lcov \
--source-dir=. \
.
echo '::set-output name=report::target/debug/lcov.info'
- uses: codecov/codecov-action@v2
with:
files: ${{ steps.coverage.outputs.report }}

check-readme:
runs-on: ubuntu-latest
Expand Down

0 comments on commit b7cd1e5

Please sign in to comment.