Skip to content

Prerelease tests

Prerelease tests #9

Workflow file for this run

name: Prerelease tests
on:
push:
branches:
- ci/prerelease
schedule:
# 8am EST / 9am EDT Mondays
- cron: "0 13 * * 1"
# Allow job to be triggered manually from GitHub interface
workflow_dispatch:
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
# Force tox and pytest to use color
FORCE_COLOR: true
jobs:
test:
# Check each OS, all supported Python, minimum versions and latest releases
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.12", "3.13"]
dependencies: [pre]
env:
DEPENDS: ${{ matrix.dependencies }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install tox
run: |
uv tool install --with=tox-uv --with=tox-gh-actions tox
- name: Show tox config
run: tox c
- name: Setup test suite
run: tox run -vv --notest
- name: Run tox
id: pre
run: tox -v --skip-pkg-install --exit-and-dump-after 1200
- uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
if: ${{ always() }}
- name: Upload pytest test results
uses: actions/upload-artifact@v7
with:
name: pytest-results-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.dependencies }}
path: test-results.xml
if: always()
- name: Create issue
# Workflows triggered by schedule only notify the workflow creator
# So let's open an issue to make sure this is visible to all
if: ${{ steps.pre.outcome != 'success' }}
uses: JasonEtco/create-an-issue@v2.9.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run_id: ${{ github.run_id }}
repository: ${{ github.repository }}
workflow_name: PRE-RELEASE TESTS
with:
filename: .github/workflow_failure.md
update_existing: true
search_existing: open
- name: Return failure
if: ${{ steps.pre.outcome != 'success' }}
run: exit 1