Skip to content

Commit 8e7cf08

Browse files
committed
CI: fix coverage submission.
1 parent 84dff93 commit 8e7cf08

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

.editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ indent_size = 4
77
max_line_length = 100
88
trim_trailing_whitespace = true
99
insert_final_newline = true
10+
11+
[.github/*.yaml]
12+
indent_size = 2

.github/workflows/main.yaml

+13-5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ jobs:
88

99
test:
1010
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write
1113
strategy:
1214
matrix:
1315
python-version:
@@ -41,7 +43,6 @@ jobs:
4143
sudo add-apt-repository 'deb http://ppa.launchpad.net/sri-csl/formal-methods/ubuntu bionic main'
4244
sudo apt-get update
4345
sudo apt-get install yices2
44-
pip install codecov build
4546
pdm install --dev
4647
- name: Cache YoWASP build products
4748
uses: actions/cache@v4
@@ -53,9 +54,16 @@ jobs:
5354
- name: Run tests
5455
run: |
5556
pdm run test
56-
- name: Submit code coverage
57-
run: |
58-
codecov
57+
pdm run python -m coverage xml
58+
- name: Upload coverage to Codecov
59+
uses: codecov/codecov-action@v4
60+
env:
61+
PYTHON: ${{ matrix.python-version }}
62+
with:
63+
use_oidc: true
64+
token: ${{ secrets.CODECOV_TOKEN }}
65+
env_vars: PYTHON
66+
file: ./coverage.xml
5967

6068
smoketest: # If we plug this into downstream projects, does magic smoke escape?
6169
runs-on: ubuntu-latest
@@ -260,4 +268,4 @@ jobs:
260268
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
261269
with:
262270
tag_name: ${{ github.ref_name }}
263-
release_name: ${{ steps.metadata.outputs.name }}
271+
release_name: ${{ steps.metadata.outputs.name }}

0 commit comments

Comments
 (0)