ASH v3 Release #85
This file contains hidden or 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: ASH - Matrix Unit Tests | |
on: | |
push: | |
branches: | |
- "!main" | |
pull_request: | |
branches: | |
- "*" | |
workflow_dispatch: {} | |
env: | |
COLUMNS: 160 | |
permissions: | |
contents: read | |
jobs: | |
unit-test: | |
name: Unit Test Python | |
runs-on: ${{ matrix.runner }} | |
permissions: | |
contents: read | |
pull-requests: write | |
checks: write | |
statuses: write | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# Ubuntu (x86_64) | |
- os: Ubuntu | |
runner: ubuntu-latest | |
python-version: "3.10" | |
arch: x86_64 | |
- os: Ubuntu | |
runner: ubuntu-latest | |
python-version: "3.11" | |
arch: x86_64 | |
- os: Ubuntu | |
runner: ubuntu-latest | |
python-version: "3.12" | |
arch: x86_64 | |
- os: Ubuntu | |
runner: ubuntu-latest | |
python-version: "3.13" | |
arch: x86_64 | |
# Ubuntu (arm64) | |
- os: Ubuntu | |
runner: ubuntu-24.04-arm | |
python-version: "3.10" | |
arch: arm64 | |
- os: Ubuntu | |
runner: ubuntu-24.04-arm | |
python-version: "3.11" | |
arch: arm64 | |
- os: Ubuntu | |
runner: ubuntu-24.04-arm | |
python-version: "3.12" | |
arch: arm64 | |
- os: Ubuntu | |
runner: ubuntu-24.04-arm | |
python-version: "3.13" | |
arch: arm64 | |
# macOS (x86_64) | |
- os: macOS | |
runner: macos-latest | |
python-version: "3.10" | |
arch: x86_64 | |
- os: macOS | |
runner: macos-latest | |
python-version: "3.11" | |
arch: x86_64 | |
- os: macOS | |
runner: macos-latest | |
python-version: "3.12" | |
arch: x86_64 | |
- os: macOS | |
runner: macos-latest | |
python-version: "3.13" | |
arch: x86_64 | |
# Windows | |
- os: Windows | |
runner: windows-latest | |
python-version: "3.10" | |
arch: x86_64 | |
- os: Windows | |
runner: windows-latest | |
python-version: "3.11" | |
arch: x86_64 | |
- os: Windows | |
runner: windows-latest | |
python-version: "3.12" | |
arch: x86_64 | |
- os: Windows | |
runner: windows-latest | |
python-version: "3.13" | |
arch: x86_64 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "pip" | |
- name: Install Poetry (Linux/macOS) | |
if: runner.os != 'Windows' | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Install Poetry (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python - | |
echo "$env:APPDATA\Python\Scripts" >> $env:GITHUB_PATH | |
- name: Install dependencies | |
run: | | |
poetry config virtualenvs.create true | |
poetry config virtualenvs.in-project true | |
poetry install | |
- name: Run PyTest | |
run: poetry run pytest | |
- name: Publish PyTest JUnit Test Report | |
uses: mikepenz/action-junit-report@v5 | |
if: success() || failure() # always run even if the previous step fails | |
continue-on-error: true | |
with: | |
report_paths: "**/pytest.junit.xml" | |
include_passed: true | |
update_check: true | |
check_name: PyTest - ${{ matrix.os }} ${{ matrix.arch }} Python ${{ matrix.python-version }} | |
- name: Code Coverage Report | |
uses: irongut/[email protected] | |
if: runner.os == 'Linux' && matrix.python-version == '3.12' && matrix.arch == 'x86_64' # Only run on one configuration | |
continue-on-error: true | |
with: | |
filename: "test-results/pytest.coverage.xml" | |
badge: true | |
format: markdown | |
fail_below_min: false | |
hide_branch_rate: false | |
hide_complexity: false | |
indicators: true | |
output: both | |
thresholds: "50 75" | |
- name: Upload test results | |
if: success() || failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-results-${{ matrix.os }}-${{ matrix.arch }}-py${{ matrix.python-version }} | |
path: test-results/ | |
if-no-files-found: warn |