Skip to content

Test

Test #43

Workflow file for this run

---
name: Test
on:
workflow_dispatch:
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.10', 3.9, 3.7, 3.8, 3.11, 3.12]
architecture: ['x64']
include:
- os: macos-latest
python-version: 3.9
architecture: 'x64'
- name: Windows
os: windows-latest
python-version: 3.9
architecture: 'x64'
- name: Windows-32bit
os: windows-latest
python-version: 3.7
architecture: 'x86'
fail-fast: false
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
- name: Install a 32 bit compiler
if: ${{ matrix.architecture == 'x86' }}
uses: bwoodsend/setup-winlibs-action@v1
with:
architecture: 32
- name: Install
shell: bash
run: pip install --cache-dir=pip-cache -e .[test] toml
- name: Compile
run: python setup.py build
- name: Test
run: pytest
# Test PyInstaller.
- run: pip install pyinstaller
- working-directory: tests/PyInstaller_
run: pyinstaller frozen-pytest.spec
- working-directory: tests/PyInstaller_
run: ./dist/frozen-pytest/frozen-pytest ../..
# Test old versions of dependencies. Should these fail, re-pin to working
# versions both here and in the pyproject.toml
- run: pip install -r minimum-versions.txt && pytest
if: ${{ matrix.python-version == 3.7 }}