AdithyaSK's picture
AdithyaSK HF Staff
Publish 100 swe_next Harbor tasks
d40299b verified
Raw History Blame Contribute Delete
4.79 kB
name: Test
on:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
env:
FORCE_COLOR: 1
permissions: {}
jobs:
test:
name: ${{ matrix.os }} / ${{ matrix.python_version }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [Ubuntu, Windows, macOS]
python_version:
["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15", "3.13t", "3.14t", "3.15t", "pypy3.9", "pypy3.10", "pypy3.11"]
include:
- os: Ubuntu
python_version: "3.11.0"
- os: Ubuntu
python_version: "3.12.0"
- os: Ubuntu
python_version: "3.13.0"
- os: Ubuntu
python_version: "3.14.0"
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
name: Install Python ${{ matrix.python_version }}
with:
python-version: ${{ matrix.python_version }}
allow-prereleases: true
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
name: Setup uv
- name: Run nox
run: pipx run nox -s tests
env:
NOXFORCEPYTHON: ${{ matrix.python_version }}
musl:
name: Alpine / musl
runs-on: ubuntu-latest
container: alpine:3.23.4@sha256:5b10f432ef3da1b8d4c7eb6c487f2f5a8f096bc91145e68878dd4a5019afde11
steps:
# Alpine ships a genuinely musl-linked Python, so this exercises the
# musllinux tag detection code paths that glibc runners cannot.
- name: Install system dependencies
run: apk add --no-cache git python3
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
name: Setup uv
- name: Run tests
run: uv run --python python3 python -m pytest
env:
UV_PYTHON_PREFERENCE: only-system
property-tests:
name: Property tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
name: Install Python 3.14
with:
python-version: "3.14"
cache: "pip"
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
name: Setup uv
- name: Run nox
run: pipx run nox -s property_tests
downstream:
name: Downstream ${{ matrix.project }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
project:
- packaging_legacy
- build
- pyproject_metadata
- setuptools
- pip
- dependency_groups
- dep_logic
- twine
- cibuildwheel
- hatchling
- tox
- virtualenv
- pdm
- poetry_core
- pipenv
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
name: Install Python 3.14
with:
python-version: "3.14"
cache: "pip"
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
name: Setup uv
- name: Run nox
env:
MATRIX_PROJECT: ${{ matrix.project }}
run: pipx run nox -s "downstream(project='$MATRIX_PROJECT')"
pickle:
name: Pickle test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
name: Install Python 3.14
with:
python-version: "3.14"
cache: "pip"
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
name: Setup uv
- name: Run nox
run: pipx run nox -s test_pickle
pass:
name: All pass
if: always()
needs:
- test
- musl
runs-on: ubuntu-slim
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
jobs: ${{ toJSON(needs) }}