-
Notifications
You must be signed in to change notification settings - Fork 16
68 lines (58 loc) · 1.85 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
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
name: Coverage
on:
push:
branches:
- main
paths:
- ".github/workflows/coverage.yml"
- ".github/workflows/scripts/coverage.sh"
- "**.rs"
- "**.toml"
pull_request:
paths:
- ".github/workflows/coverage.yml"
- ".github/workflows/scripts/coverage.sh"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: llvm-tools-preview
- uses: actions-rs/[email protected]
with:
crate: cargo-binutils
version: 0.3.3
- uses: actions-rs/[email protected]
with:
crate: rustfilt
version: 0.2.1
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: "6.0"
mongodb-username: root
mongodb-password: root
# FIXME: Currently we cannot configure this action to use authentication together with replica sets as mentioned here:
# https://github.com/supercharge/mongodb-github-action#with-authentication-mongodb---auth-flag
# Apparently, the solution is to write a script that sets up the user beforehand.
#mongodb-replica-set: test-rs
- name: Run test coverage
run: bash .github/workflows/scripts/coverage.sh
env:
MONGODB_CONN_STR: mongodb://root:root@localhost:27017
- uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage/coverage.info