-
Notifications
You must be signed in to change notification settings - Fork 7
50 lines (41 loc) · 1.35 KB
/
tests.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
41
42
43
44
45
46
47
48
49
50
name: Project Tests
on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
jobs:
rust-coverage:
runs-on: ubuntu-latest
container:
image: xd009642/tarpaulin:develop-nightly
options: --security-opt seccomp=unconfined
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Update apt-get
run: apt update -y
- name: Install sudo
run: apt install sudo -y
- name: Install Dependencies
run: cargo xtask dependencies -dip sudo
- name: run tests with coverage
run: cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --exclude-files build.rs xtask/src/* -e xtask --out Xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: cobertura.xml
flags: unittests
- name: run tests with coverage as Admin
run: sudo -E /usr/local/cargo/bin/cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --exclude-files build.rs xtask/src/* -e xtask --out Xml
- name: Upload coverage reports to Codecov as Admin
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: cobertura.xml
flags: admin-unittests