Skip to content

Commit 216e3ed

Browse files
authored
ci: stabilize coverage (Gallopsled#2235)
* ci: stabilize coverage * fix cache dirs
1 parent c334d46 commit 216e3ed

File tree

4 files changed

+43
-15
lines changed

4 files changed

+43
-15
lines changed

.coveragerc

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ jobs:
55
test:
66
strategy:
77
matrix:
8-
python_version: [2.7, 3.8]
8+
python_version: ['2.7', '3.10']
99
os: [ubuntu-latest]
1010
runs-on: ${{ matrix.os }}
1111
timeout-minutes: 30
1212
steps:
1313
- uses: actions/checkout@v3
1414
with:
15-
fetch-depth: 0
15+
fetch-depth: 20
1616

1717
- name: Git History
1818
run: |
@@ -187,11 +187,35 @@ jobs:
187187
name: packages
188188
path: dist/
189189

190+
- uses: actions/upload-artifact@v2
191+
with:
192+
name: coverage
193+
path: .coverage*
194+
195+
196+
upload-coverage:
197+
runs-on: ubuntu-latest
198+
needs: test
199+
steps:
200+
- uses: actions/checkout@v3
201+
with:
202+
fetch-depth: 20
203+
204+
- uses: actions/download-artifact@v2
205+
with:
206+
name: coverage
207+
path: .
208+
209+
- name: Install coveralls
210+
run: |
211+
pip install tomli coveralls
212+
190213
- name: Upload coverage to coveralls.io
191214
run: |
192215
coverage combine
193216
COVERALLS_REPO_TOKEN=PP20MEgztXIQJJTguQwe2jeCh6Bm4lkbv coveralls
194217
218+
195219
staging-merge:
196220
runs-on: ubuntu-latest
197221
if: github.repository_owner == 'Gallopsled' && github.event_name == 'push' && startsWith(github.event.ref, 'refs/heads/') && endsWith(github.event.ref, '-staging')
@@ -210,6 +234,7 @@ jobs:
210234
git push origin "$TARGET"
211235
git push origin --delete "$BRANCH"
212236
237+
213238
pypi:
214239
runs-on: ubuntu-latest
215240
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
capstone
2-
coveralls
2+
coverage[toml]
33
python-dateutil
44
doc2dash
55
docutils<0.18

pyproject.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,18 @@ include-package-data = false
7070

7171
[tool.setuptools.packages.find]
7272
namespaces = false
73+
74+
[tool.coverage.run]
75+
branch = true
76+
parallel = true
77+
concurrency = ["thread", "multiprocessing"]
78+
omit = [
79+
"*/constants/*",
80+
]
81+
source = [
82+
"pwn",
83+
"pwnlib",
84+
"~/.cache/.pwntools-cache-2.7/",
85+
"~/.cache/.pwntools-cache-3.10/",
86+
]
87+
disable_warnings = ["module-not-imported"]

0 commit comments

Comments
 (0)