Repository navigation
61 lines (50 loc) · 1.62 KB
/
Copy pathpython-coverage.yml
File metadata and controls
61 lines (50 loc) · 1.62 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
name: Tests with Coverage
on:
pull_request:
branches: [ release ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test-with-coverage:
name: Run Tests
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Fandango
uses: ./.github/workflows/setup-fandango
with:
python-version: "3.13"
needs-sudo: true
- name: Install system dependencies for coverage (main + Ubuntu only)
run: |
sudo apt-get update
sudo apt-get install -y python3-dev graphviz libgraphviz-dev pkg-config libarchive-tools llvm
pip install pygraphviz
- name: Run coverage (main + Ubuntu only)
run: |
make coverage
python3 -m coverage lcov
- name: Upload HTML report (main + Ubuntu only)
uses: actions/upload-artifact@v4
with:
name: Test Report
path: report.html
- name: Cache pygraphviz site-packages (main + Ubuntu only)
uses: actions/cache@v3
with:
path: /usr/local/lib/python3.11/dist-packages
key: pygraphviz-${{ runner.os }}-python3.11
restore-keys: |
pygraphviz-${{ runner.os }}-
- name: Upload to Coveralls (main + Ubuntu only)
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov