Skip to content

Fix creating gh issues when test_nightly fails (#298) #28

Fix creating gh issues when test_nightly fails (#298)

Fix creating gh issues when test_nightly fails (#298) #28

Workflow file for this run

name: coverage
on:
workflow_dispatch:
push:
branches:
- master
env:
CARGO_TERM_COLOR: always
jobs:
coverage:
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4
- name: Cache cargo & target directories
uses: Swatinem/rust-cache@v2
with:
key: "v2"
- name: Install gnome-keyring and keyutils on Linux
run: |
sudo apt-get update --yes && sudo apt-get install --yes gnome-keyring keyutils
rm -f $HOME/.local/share/keyrings/*
echo -n "test" | gnome-keyring-daemon --unlock
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Build
run: source <(cargo llvm-cov show-env --export-prefix) && cargo build
- name: Test
run: source <(cargo llvm-cov show-env --export-prefix) && cargo test
- name: Generate code coverage
run: source <(cargo llvm-cov show-env --export-prefix) && cargo llvm-cov report --codecov --output-path codecov.json --ignore-filename-regex '(bench\/|cli\/|integration\/|tools\/)'
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: codecov.json
fail_ci_if_error: false