-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.1 KB
/
coverage.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Coverage
on: [pull_request, push]
jobs:
coverage:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12
env:
POSTGRES_USER: recipes
POSTGRES_PASSWORD: recipes
POSTGRES_DB: recipes
ports:
- 5432:5432
env:
CARGO_TERM_COLOR: always
DATABASE_URL: postgres://recipes:recipes@localhost:5432/recipes
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Install Task
uses: arduino/setup-task@v1
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Generate code coverage
run: task test:coverage:ci
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: lcov.info
fail_ci_if_error: true