Skip to content

Testing on Windows #1806

Testing on Windows

Testing on Windows #1806

Workflow file for this run

# GitHub Actions Workflow configuration
# https://docs.github.com/actions/reference/workflow-syntax-for-github-actions
# https://docs.github.com/actions/guides/building-and-testing-python
name: Tox
# Note: on key treated as boolean key by YAML
# https://github.com/adrienverge/yamllint/issues/158#issuecomment-454313233
# However, GitHub Actions documentation is consistent in using it unquoted.
on: # yamllint disable-line rule:truthy
pull_request:
branches-ignore:
- template
push:
branches-ignore:
- template
schedule:
# Run once a day (at 8:20 AM UTC) to check for exogenous breakage.
# TODO: Run when dependencies are updated. (Like Dependabot, but on
# in-range updates and without sending a PR.)
- cron: '20 8 * * *'
workflow_dispatch: {}
permissions: {}
jobs:
test-secondary:
name: >-
Test on Python ${{ matrix.python.version }} ${{ matrix.arch }}
on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
arch:
# Uncomment if package needs testing on different architectures
# - x86
- x64
os:
# Uncomment if package needs testing on macOS:
# - macos-latest
- windows-latest
python:
- version: 3.9
exe: python
toxenv: py39
- version: 3.x
exe: python
toxenv: py3
- version: pypy-3.9
exe: pypy3
toxenv: pypy3
exclude:
# Exclude os/version already run in test-primary
- arch: x64
os: ubuntu-latest
python:
version: 3.x
exe: python
toxenv: py3
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Set up Python ${{ matrix.python.version }}
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: ${{ matrix.python.version }}
architecture: ${{ matrix.arch }}
- name: Display Python version
run: python --version
- name: Install dependencies
run: |-
${{ matrix.python.exe }} -m pip install --upgrade setuptools tox wheel
- name: Run tox
run: ${{ matrix.python.exe }} -m tox -e ${{ matrix.python.toxenv }}
- name: Build wheel
run: ${{ matrix.python.exe }} setup.py bdist_wheel
- name: Archive wheel
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: dist-${{ matrix.os }}-${{ matrix.python.toxenv }}
path: dist/*.whl