Skip to content

test

test #19

Workflow file for this run

# -- SOURCE: https://github.com/marketplace/actions/setup-python
# SEE: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
# SUPPORTED PYTHON VERSIONS: https://github.com/actions/python-versions
name: tests
on:
workflow_dispatch:
push:
branches: [ "main", "release/**" ]
pull_request:
branches: [ "main" ]
jobs:
test:
# -- EXAMPLE: runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# PREPARED: os: [ubuntu-latest, macos-latest, windows-latest]
# PREPARED: python-version: ['3.9', '2.7', '3.10', '3.8', 'pypy-2.7', 'pypy-3.8']
os: [ubuntu-latest, windows-latest]
python-version: ["3.11", "3.10", "3.9", "3.8"]
exclude:
- os: windows-latest
python-version: "2.7"
steps:
- uses: actions/checkout@v3
# DISABLED: name: Setup Python ${{ matrix.python-version }} on platform=${{ matrix.os }}
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'py.requirements/*.txt'
# -- DISABLED:
# - name: Show Python version
# run: python --version
- name: Install Python package dependencies
run: |
python -m pip install -U pip setuptools wheel
pip install --upgrade -r py.requirements/ci.github.testing.txt
pip install -e .
- name: Run tests
run: pytest
- name: Upload test reports
uses: actions/upload-artifact@v3
with:
name: test reports
path: |
build/testing/report.xml
build/testing/report.html
if: ${{ job.status == 'failure' }}
# MAYBE: if: ${{ always() }}