Skip to content

Change to coveralls as codecov doesn't work #13

Change to coveralls as codecov doesn't work

Change to coveralls as codecov doesn't work #13

name: "Check python code format and tests"
# See https://black.readthedocs.io/en/stable/integrations/github_actions.html
on: [push, pull_request]
jobs:
check-python-with-black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare-python
- uses: psf/black@stable
with:
options: "--check --diff --verbose --color --force-exclude '^snapshot_manager/tests/test_logs/'"
run-tests:
name: run-tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare-python
- name: Run pytest with coverage
shell: bash -e {0}
run: |
coverage run -m pytest
coverage report -m
- name: Archive code coverage results
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: .coverage
upload-coverage:
needs: run-tests
runs-on: ubuntu-latest
steps:
- name: Download coverage report
uses: actions/download-artifact@v4
with:
name: code-coverage-report
path: coverage-report/
- name: Display structure of downloaded files
run: ls -Rhl coverage-report
- name: Coveralls
uses: coverallsapp/github-action@v2.2.3
with:
format: python
file: coverage-report/.coverage