-
Notifications
You must be signed in to change notification settings - Fork 21
52 lines (41 loc) · 1.26 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
# This workflow runs tests and reports code coverage.
# We need a workflow name to be able to schedule it from Github UI
name: TestCoverage
on:
# Triggers the workflow on push to main
push:
branches:
- main
# Triggers the workflow on any PR
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# The job ID has to match repo settings for PR required checks
TestCoverage:
runs-on: ${{ matrix.os }}
# Run jobs for a couple of Python versions and OSes.
strategy:
matrix:
os: ["ubuntu-latest"]
python: ["3.9", "3.10", "3.11"]
name: Coverage - Python ${{ matrix.python }} - ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
# Load a specific version of Python
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
architecture: x64
- name: Install deps
shell: bash
run: make github_actions
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
- name: Run tests and gather coverage stats
shell: bash
run: make coverage
- name: Print code coverage report
shell: bash
run: make show-coverage-text-report