mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-31 22:18:12 +08:00
Create pythonunit.yml
This commit is contained in:
45
.github/workflows/pythonunit.yml
vendored
Normal file
45
.github/workflows/pythonunit.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
name: Python Unit Tests
|
||||
|
||||
on:
|
||||
workflow_dispatch: # Only allow manual trigger of the workflow
|
||||
|
||||
env:
|
||||
# Configure a constant location for the uv cache
|
||||
UV_CACHE_DIR: /tmp/.uv-cache
|
||||
|
||||
jobs:
|
||||
python-unit-tests:
|
||||
name: Python Unit Tests
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: ${{ matrix.experimental }}
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
python-version: ["3.10", "3.11", "3.12"]
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
experimental: [false]
|
||||
include:
|
||||
- python-version: "3.13"
|
||||
os: "ubuntu-latest"
|
||||
experimental: true
|
||||
env:
|
||||
UV_PYTHON: ${{ matrix.python-version }}
|
||||
permissions:
|
||||
contents: write
|
||||
defaults:
|
||||
run:
|
||||
working-directory: python
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up uv
|
||||
uses: astral-sh/setup-uv@v5
|
||||
with:
|
||||
version: "0.5.x"
|
||||
enable-cache: true
|
||||
cache-suffix: ${{ runner.os }}-${{ matrix.python-version }}
|
||||
cache-dependency-glob: "**/uv.lock"
|
||||
- name: Install the project
|
||||
run: uv sync --all-extras --dev -U --prerelease=if-necessary-or-explicit
|
||||
- name: Test with pytest
|
||||
env:
|
||||
PYTHON_GIL_
|
||||
Reference in New Issue
Block a user