👷 Move from Codecov to Smokeshow (#486)
This commit is contained in:
parent
ea79c47c0e
commit
5956940908
35
.github/workflows/smokeshow.yml
vendored
Normal file
35
.github/workflows/smokeshow.yml
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
name: Smokeshow
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_run:
|
||||||
|
workflows: [Test]
|
||||||
|
types: [completed]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
statuses: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
smokeshow:
|
||||||
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.9'
|
||||||
|
|
||||||
|
- run: pip install smokeshow
|
||||||
|
|
||||||
|
- uses: dawidd6/action-download-artifact@v2
|
||||||
|
with:
|
||||||
|
workflow: test.yml
|
||||||
|
commit: ${{ github.event.workflow_run.head_sha }}
|
||||||
|
|
||||||
|
- run: smokeshow upload coverage-html
|
||||||
|
env:
|
||||||
|
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage}
|
||||||
|
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 100
|
||||||
|
SMOKESHOW_GITHUB_CONTEXT: coverage
|
||||||
|
SMOKESHOW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
SMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
|
||||||
|
SMOKESHOW_AUTH_KEY: ${{ secrets.SMOKESHOW_AUTH_KEY }}
|
40
.github/workflows/test.yml
vendored
40
.github/workflows/test.yml
vendored
@ -56,7 +56,43 @@ jobs:
|
|||||||
- name: Lint
|
- name: Lint
|
||||||
if: ${{ matrix.python-version != '3.6.15' }}
|
if: ${{ matrix.python-version != '3.6.15' }}
|
||||||
run: python -m poetry run bash scripts/lint.sh
|
run: python -m poetry run bash scripts/lint.sh
|
||||||
|
- run: mkdir coverage
|
||||||
- name: Test
|
- name: Test
|
||||||
run: python -m poetry run bash scripts/test.sh
|
run: python -m poetry run bash scripts/test.sh
|
||||||
- name: Upload coverage
|
env:
|
||||||
uses: codecov/codecov-action@v3
|
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
|
||||||
|
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
|
||||||
|
- name: Store coverage files
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: coverage
|
||||||
|
path: coverage
|
||||||
|
coverage-combine:
|
||||||
|
needs: [test]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.8'
|
||||||
|
|
||||||
|
- name: Get coverage files
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: coverage
|
||||||
|
path: coverage
|
||||||
|
|
||||||
|
- run: pip install coverage[toml]
|
||||||
|
|
||||||
|
- run: ls -la coverage
|
||||||
|
- run: coverage combine coverage
|
||||||
|
- run: coverage report
|
||||||
|
- run: coverage html --show-contexts --title "Coverage for ${{ github.sha }}"
|
||||||
|
|
||||||
|
- name: Store coverage HTML
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: coverage-html
|
||||||
|
path: htmlcov
|
||||||
|
@ -11,9 +11,8 @@
|
|||||||
<a href="https://github.com/tiangolo/sqlmodel/actions?query=workflow%3APublish" target="_blank">
|
<a href="https://github.com/tiangolo/sqlmodel/actions?query=workflow%3APublish" target="_blank">
|
||||||
<img src="https://github.com/tiangolo/sqlmodel/workflows/Publish/badge.svg" alt="Publish">
|
<img src="https://github.com/tiangolo/sqlmodel/workflows/Publish/badge.svg" alt="Publish">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://codecov.io/gh/tiangolo/sqlmodel" target="_blank">
|
<a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/tiangolo/sqlmodel" target="_blank">
|
||||||
<img src="https://img.shields.io/codecov/c/github/tiangolo/sqlmodel?color=%2334D058" alt="Coverage">
|
<img src="https://coverage-badge.samuelcolvin.workers.dev/tiangolo/sqlmodel.svg" alt="Coverage">
|
||||||
</a>
|
|
||||||
<a href="https://pypi.org/project/sqlmodel" target="_blank">
|
<a href="https://pypi.org/project/sqlmodel" target="_blank">
|
||||||
<img src="https://img.shields.io/pypi/v/sqlmodel?color=%2334D058&label=pypi%20package" alt="Package version">
|
<img src="https://img.shields.io/pypi/v/sqlmodel?color=%2334D058&label=pypi%20package" alt="Package version">
|
||||||
</a>
|
</a>
|
||||||
|
@ -11,9 +11,8 @@
|
|||||||
<a href="https://github.com/tiangolo/sqlmodel/actions?query=workflow%3APublish" target="_blank">
|
<a href="https://github.com/tiangolo/sqlmodel/actions?query=workflow%3APublish" target="_blank">
|
||||||
<img src="https://github.com/tiangolo/sqlmodel/workflows/Publish/badge.svg" alt="Publish">
|
<img src="https://github.com/tiangolo/sqlmodel/workflows/Publish/badge.svg" alt="Publish">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://codecov.io/gh/tiangolo/sqlmodel" target="_blank">
|
<a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/tiangolo/sqlmodel" target="_blank">
|
||||||
<img src="https://img.shields.io/codecov/c/github/tiangolo/sqlmodel?color=%2334D058" alt="Coverage">
|
<img src="https://coverage-badge.samuelcolvin.workers.dev/tiangolo/sqlmodel.svg" alt="Coverage">
|
||||||
</a>
|
|
||||||
<a href="https://pypi.org/project/sqlmodel" target="_blank">
|
<a href="https://pypi.org/project/sqlmodel" target="_blank">
|
||||||
<img src="https://img.shields.io/pypi/v/sqlmodel?color=%2334D058&label=pypi%20package" alt="Package version">
|
<img src="https://img.shields.io/pypi/v/sqlmodel?color=%2334D058&label=pypi%20package" alt="Package version">
|
||||||
</a>
|
</a>
|
||||||
|
@ -67,6 +67,7 @@ source = [
|
|||||||
"tests",
|
"tests",
|
||||||
"sqlmodel"
|
"sqlmodel"
|
||||||
]
|
]
|
||||||
|
context = '${CONTEXT}'
|
||||||
|
|
||||||
[tool.coverage.report]
|
[tool.coverage.report]
|
||||||
exclude_lines = [
|
exclude_lines = [
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
set -x
|
|
||||||
|
|
||||||
bash ./scripts/test.sh
|
|
||||||
coverage html
|
|
@ -6,4 +6,4 @@ set -x
|
|||||||
coverage run -m pytest tests
|
coverage run -m pytest tests
|
||||||
coverage combine
|
coverage combine
|
||||||
coverage report --show-missing
|
coverage report --show-missing
|
||||||
coverage xml
|
coverage html
|
||||||
|
Loading…
x
Reference in New Issue
Block a user