File tree Expand file tree Collapse file tree 7 files changed +79
-16
lines changed
Expand file tree Collapse file tree 7 files changed +79
-16
lines changed Original file line number Diff line number Diff line change 1+ name : Smokeshow
2+
3+ on :
4+ workflow_run :
5+ workflows : [Test]
6+ types : [completed]
7+
8+ permissions :
9+ statuses : write
10+
11+ jobs :
12+ smokeshow :
13+ if : ${{ github.event.workflow_run.conclusion == 'success' }}
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - uses : actions/setup-python@v4
18+ with :
19+ python-version : ' 3.9'
20+
21+ - run : pip install smokeshow
22+
23+ - uses : dawidd6/action-download-artifact@v2
24+ with :
25+ workflow : test.yml
26+ commit : ${{ github.event.workflow_run.head_sha }}
27+
28+ - run : smokeshow upload coverage-html
29+ env :
30+ SMOKESHOW_GITHUB_STATUS_DESCRIPTION : Coverage {coverage-percentage}
31+ SMOKESHOW_GITHUB_COVERAGE_THRESHOLD : 100
32+ SMOKESHOW_GITHUB_CONTEXT : coverage
33+ SMOKESHOW_GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34+ SMOKESHOW_GITHUB_PR_HEAD_SHA : ${{ github.event.workflow_run.head_sha }}
35+ SMOKESHOW_AUTH_KEY : ${{ secrets.SMOKESHOW_AUTH_KEY }}
Original file line number Diff line number Diff line change 5656 - name : Lint
5757 if : ${{ matrix.python-version != '3.6.15' }}
5858 run : python -m poetry run bash scripts/lint.sh
59+ - run : mkdir coverage
5960 - name : Test
6061 run : python -m poetry run bash scripts/test.sh
61- - name : Upload coverage
62- uses : codecov/codecov-action@v3
62+ env :
63+ COVERAGE_FILE : coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
64+ CONTEXT : ${{ runner.os }}-py${{ matrix.python-version }}
65+ - name : Store coverage files
66+ uses : actions/upload-artifact@v3
67+ with :
68+ name : coverage
69+ path : coverage
70+ coverage-combine :
71+ needs : [test]
72+ runs-on : ubuntu-latest
73+
74+ steps :
75+ - uses : actions/checkout@v3
76+
77+ - uses : actions/setup-python@v4
78+ with :
79+ python-version : ' 3.8'
80+
81+ - name : Get coverage files
82+ uses : actions/download-artifact@v3
83+ with :
84+ name : coverage
85+ path : coverage
86+
87+ - run : pip install coverage[toml]
88+
89+ - run : ls -la coverage
90+ - run : coverage combine coverage
91+ - run : coverage report
92+ - run : coverage html --show-contexts --title "Coverage for ${{ github.sha }}"
93+
94+ - name : Store coverage HTML
95+ uses : actions/upload-artifact@v3
96+ with :
97+ name : coverage-html
98+ path : htmlcov
Original file line number Diff line number Diff line change 1111<a href =" https://github.com/tiangolo/sqlmodel/actions?query=workflow%3APublish " target =" _blank " >
1212 <img src="https://github.com/tiangolo/sqlmodel/workflows/Publish/badge.svg" alt="Publish">
1313</a >
14- <a href =" https://codecov.io/gh/tiangolo/sqlmodel " target =" _blank " >
15- <img src="https://img.shields.io/codecov/c/github/tiangolo/sqlmodel?color=%2334D058" alt="Coverage">
16- </a >
14+ <a href =" https://coverage-badge.samuelcolvin.workers.dev/redirect/tiangolo/sqlmodel " target =" _blank " >
15+ <img src="https://coverage-badge.samuelcolvin.workers.dev/tiangolo/sqlmodel.svg" alt="Coverage">
1716<a href =" https://pypi.org/project/sqlmodel " target =" _blank " >
1817 <img src="https://img.shields.io/pypi/v/sqlmodel?color=%2334D058&label=pypi%20package" alt="Package version">
1918</a >
Original file line number Diff line number Diff line change 1111<a href =" https://github.com/tiangolo/sqlmodel/actions?query=workflow%3APublish " target =" _blank " >
1212 <img src="https://github.com/tiangolo/sqlmodel/workflows/Publish/badge.svg" alt="Publish">
1313</a >
14- <a href =" https://codecov.io/gh/tiangolo/sqlmodel " target =" _blank " >
15- <img src="https://img.shields.io/codecov/c/github/tiangolo/sqlmodel?color=%2334D058" alt="Coverage">
16- </a >
14+ <a href =" https://coverage-badge.samuelcolvin.workers.dev/redirect/tiangolo/sqlmodel " target =" _blank " >
15+ <img src="https://coverage-badge.samuelcolvin.workers.dev/tiangolo/sqlmodel.svg" alt="Coverage">
1716<a href =" https://pypi.org/project/sqlmodel " target =" _blank " >
1817 <img src="https://img.shields.io/pypi/v/sqlmodel?color=%2334D058&label=pypi%20package" alt="Package version">
1918</a >
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ source = [
6767 " tests" ,
6868 " sqlmodel"
6969]
70+ context = ' ${CONTEXT}'
7071
7172[tool .coverage .report ]
7273exclude_lines = [
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 66coverage run -m pytest tests
77coverage combine
88coverage report --show-missing
9- coverage xml
9+ coverage html
You can’t perform that action at this time.
0 commit comments