Skip to content

QMI Python CI full test runner #16

QMI Python CI full test runner

QMI Python CI full test runner #16

name: QMI Python CI full test runner
on:
schedule:
# Schedule for every Monday at 7am
- cron: "0 7 * * 1"
workflow_dispatch:
inputs:
branch:
description: 'Branch to run workflow on'
required: true
default: 'main'
jobs:
full-test:
strategy:
max-parallel: 1
matrix:
python-version: ["3.11", "3.12", "3.13"]
uses: ./.github/workflows/reusable-ci-workflows.yml
with:
python-version: ${{ matrix.python-version }}
ref: ${{ github.head-ref }}
unit-tests:
runs-on: ubuntu-latest
needs: full-test
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch || inputs.ref }}
- name: Check py-xdrlib installation for Python 3.13
if: ${{ matrix.python-version }} == "3.13"
run: python -m pip install py-xdrlib
- name: Run unit tests and generate report
if: always()
run: |
python -m pip install .
python -m pip install unittest-xml-reporting
python -m xmlrunner --output-file testresults.xml discover --start-directory=tests --pattern="test_*.py"
- name: Upload unit test results
if: always()
uses: actions/upload-artifact@v4
with:
name: unit-test-results-${{ matrix.python-version }}
path: testresults.xml