Fix schemas generation on RTD (backport #5789) #4149
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
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- develop | |
- 8.0 | |
- 8.1 | |
- 8.2 | |
pull_request: | |
branches: | |
- develop | |
- 8.0 | |
- 8.1 | |
- 8.2 | |
name: Run tests | |
jobs: | |
precommit: | |
name: Pre-commit checks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install deps | |
run: pip install click | |
# we only really need to run the precommit checks for one release, | |
# so we just do it for pip | |
- name: Run the pre-commit checks | |
run: devel/ci/bodhi-ci pre-commit -r pip | |
diff_cover: | |
name: Diff-cover check | |
runs-on: ubuntu-latest | |
needs: unit_tests | |
# Run diff-cover even if the unit tests failed on rawhide: | |
if: always() | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
- name: Edit the path in the coverage files | |
run: sed -i -e "s,<source>/bodhi,<source>$PWD," Coverage*/coverage.xml | |
shell: bash | |
- name: Install deps | |
run: pip install diff-cover | |
- name: Run the diff-cover check | |
shell: bash | |
run: diff-cover --compare-branch=origin/develop --fail-under=100 Coverage*/coverage.xml | |
integration_tests: | |
name: Integration Tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install deps | |
run: pip3 install click -r devel/ci/integration/requirements.txt | |
- name: Run the integration tests | |
run: python3 devel/ci/bodhi-ci integration -r ${{ matrix.release }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# integration tests are broken on pip atm, so not included in this list. | |
release: [f40,f41,rawhide] | |
unit_tests: | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install deps | |
run: pip install click | |
- name: Run the unit tests | |
run: devel/ci/bodhi-ci unit -r ${{ matrix.release }} -m ${{matrix.module}} | |
- name: Upload coverage report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Coverage for ${{ matrix.module }} on ${{ matrix.release }} | |
path: test_results/${{ matrix.release }}-unit/${{ matrix.module }}/coverage.xml | |
strategy: | |
fail-fast: false | |
matrix: | |
release: [f40,f41,pip,rawhide] | |
module: [bodhi-client, bodhi-messages, bodhi-server] | |
docs: | |
name: Build Documentation | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install deps | |
run: pip install click -r docs/requirements.txt | |
- name: Build the docs | |
run: devel/ci/bodhi-ci docs -r ${{ matrix.release }} | |
strategy: | |
fail-fast: false | |
matrix: | |
release: [f40,f41,pip,rawhide] | |
rpms: | |
name: Build the RPMS | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install deps | |
run: pip install click | |
- name: Build the rpms | |
run: devel/ci/bodhi-ci rpm -r ${{ matrix.release }} | |
- name: Upload built rpms | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.release }} RPMs | |
path: | | |
test_results/${{ matrix.release }}-rpm/*.noarch.rpm | |
test_results/${{ matrix.release }}-rpm/*.src.rpm | |
strategy: | |
fail-fast: false | |
matrix: | |
release: [f40,f41,rawhide] |