-
-
Notifications
You must be signed in to change notification settings - Fork 49
69 lines (55 loc) · 2.03 KB
/
test-coverage.yml
File metadata and controls
69 lines (55 loc) · 2.03 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Test and coverage
on: [push, pull_request]
permissions:
contents: read
actions: write
env:
CARGO_TERM_COLOR: always
jobs:
test-coverage:
runs-on: ubuntu-latest
container:
image: archlinux:latest
steps:
- name: Checkout
uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- name: Build Cache
uses: Swatinem/rust-cache@v2
- name: Install wayland dependencies
run: |
pacman -Syu --noconfirm git egl-wayland egl-gbm wayland base-devel mesa pango cairo
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov
- name: Run tests
run: cargo test --all-features --verbose
- name: Generate coverage report (libwayshot)
run: |
cargo llvm-cov --all-features -p libwayshot --lcov --output-path lcov-libwayshot.info
- name: Generate coverage report (wayshot)
run: |
cargo llvm-cov --all-features -p wayshot --lcov --output-path lcov-wayshot.info
- name: Upload libwayshot coverage to Codecov
uses: codecov/codecov-action@v6
with:
files: ./lcov-libwayshot.info
flags: libwayshot
name: libwayshot
fail_ci_if_error: false
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Upload wayshot coverage to Codecov
uses: codecov/codecov-action@v6
with:
files: ./lcov-wayshot.info
flags: wayshot
name: wayshot
fail_ci_if_error: false
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}