MNT: Resurrect tox config to cover dev workflows and CI checks #1656
Workflow file for this run
This file contains 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: Pre-release checks | |
# This file tests against pre-release wheels for dependencies | |
on: | |
push: | |
branches: | |
- master | |
- maint/* | |
pull_request: | |
branches: | |
- master | |
- maint/* | |
schedule: | |
- cron: '0 0 * * *' | |
defaults: | |
run: | |
shell: bash | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
pre-release: | |
# Check pre-releases of dependencies on stable Python | |
runs-on: ${{ matrix.os }} | |
continue-on-error: true | |
strategy: | |
matrix: | |
os: ['ubuntu-latest', 'windows-latest', 'macos-latest'] | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
architecture: ['x64', 'x86'] | |
dependencies: ['pre'] | |
exclude: | |
- os: ubuntu-latest | |
architecture: x86 | |
- os: macos-latest | |
architecture: x86 | |
- python-version: '3.12' | |
architecture: x86 | |
env: | |
DEPENDS: ${{ matrix.dependencies }} | |
ARCH: ${{ matrix.architecture }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: ${{ matrix.architecture }} | |
allow-prereleases: true | |
- name: Display Python version | |
run: python -c "import sys; print(sys.version)" | |
- name: Install tox | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install tox tox-gh-actions | |
- name: Show tox config | |
run: pipx run tox c | |
- name: Run tox | |
run: tox | |
- uses: codecov/codecov-action@v3 | |
if: ${{ always() }} | |
with: | |
files: cov.xml | |
- name: Upload pytest test results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pytest-results-${{ matrix.os }}-${{ matrix.python-version }} | |
path: test-results.xml | |
if: ${{ always() }} |