-
Notifications
You must be signed in to change notification settings - Fork 6
40 lines (31 loc) · 1.07 KB
/
coverage.yml
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:
push:
pull_request:
jobs:
coverage:
runs-on: macos-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
matrix:
box:
- fbsd_13_1
- fbsd_12_4
steps:
- uses: actions/checkout@v2
- name: Set up vagrant
run: vagrant up ${{ matrix.box }}
- name: Install coverage prerequisites
run: |
vagrant ssh ${{ matrix.box }} -- sudo pkg install -y kcov
vagrant ssh ${{ matrix.box }} -- cargo install cargo-kcov
- name: Build
run: vagrant ssh ${{ matrix.box }} -- "cd /vagrant; cargo build"
- name: Collect coverage
run: |
vagrant ssh ${{ matrix.box }} -- "cd /vagrant; cargo kcov -- --verify --exclude-pattern=/home/vagrant/.cargo,/usr/lib,/usr/local/lib,/usr/src/lib/"
vagrant ssh ${{ matrix.box }} -- "cd /vagrant/target; tar cf - cov/" | tar xv
- uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true
verbose: true