Add some automation for doing periodic mass rebuilds of Fedora packages #610
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
# We have tests in a python script that uses the dnf module, and this | |
# module can only be install via the package manager, so we need to | |
# use ubuntu-24.04, because the system version of python (3.12) | |
# matches the version we use in ./.github/actions/prepare-python. | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/prepare-python | |
- name: Run pytest with coverage | |
shell: bash -e {0} | |
env: | |
GH_TEST_TOKEN: ${{ secrets.GH_TEST_TOKEN }} | |
run: | | |
coverage run -m pytest | |
coverage report -m | |
- name: Coveralls | |
uses: coverallsapp/github-action@v2.2.3 | |
with: | |
format: python | |
file: .coverage |