Test keys snapshot #570
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.cargo/registry | |
key: '${{ runner.os }}-cargo-registry-${{ hashFiles(''**/Cargo.lock'') }}' | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.cargo/git | |
key: '${{ runner.os }}-cargo-index-${{ hashFiles(''**/Cargo.lock'') }}' | |
- uses: actions/cache@v1 | |
with: | |
path: target | |
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}V | |
- name: Build | |
if: ${{ !env.ACT }} | |
run: cargo build --verbose | |
- name: Run tests | |
env: | |
TIME_TO_START: 1 | |
run: mkdir dbs&&cargo test -- --test-threads=1 # threads=1 to avoid the problem with the in disk tests | |
coverage: | |
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 | |
env: | |
TIME_TO_START: 4 | |
NUN_ELECTION_TIMEOUT: 3000 | |
run: | | |
mkdir dbs&&cargo +nightly tarpaulin --follow-exec --engine llvm --verbose --all-features --workspace --timeout 120 --out xml -- --test-threads=1 | |
- name: Upload to codecov.io | |
uses: codecov/codecov-action@v2 | |
with: | |
token: ${{secrets.CODECOV_TOKEN}} # not required for public repos | |
fail_ci_if_error: true | |