termscp/.github/workflows/coverage.yml

40 lines
1.4 KiB
YAML
Raw Normal View History

name: Coverage
2021-04-05 09:25:19 +02:00
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
build:
2021-04-05 09:25:19 +02:00
runs-on: ubuntu-latest
2021-04-05 09:25:19 +02:00
steps:
- uses: actions/checkout@v2
2021-09-26 18:14:13 +02:00
- name: Install dependencies
run: sudo apt update && sudo apt install -y libdbus-1-dev libssh2-1-dev libssl-dev
- name: Setup containers
run: docker-compose -f "tests/docker-compose.yml" up -d --build
- name: Setup nightly toolchain
2021-05-15 17:55:20 +02:00
uses: actions-rs/toolchain@v1
2021-04-05 09:25:19 +02:00
with:
2021-05-15 17:55:20 +02:00
toolchain: nightly
override: true
- name: Run tests (nightly)
2021-05-15 17:55:20 +02:00
uses: actions-rs/cargo@v1
with:
command: test
2021-06-26 12:08:05 +02:00
args: --lib --no-default-features --features github-actions --features with-containers --no-fail-fast
2021-05-15 17:55:20 +02:00
env:
CARGO_INCREMENTAL: "0"
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests"
RUSTDOCFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests"
- name: Coverage with grcov
id: coverage
uses: actions-rs/grcov@v0.1
- name: Coveralls
uses: coverallsapp/github-action@v1.1.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ${{ steps.coverage.outputs.report }}