Skip to content

Test librarian with new wrkflw #36

Test librarian with new wrkflw

Test librarian with new wrkflw #36

Workflow file for this run

name: CI
on: [pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
discover:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.changes.outputs.all_changed_files }}
steps:
- uses: actions/checkout@v4
- id: changes
uses: tj-actions/changed-files@v44
with:
files: packages/**
# Output as a space-separated string, NOT a JSON matrix
matrix: false
unit:
needs: discover
if: ${{ needs.discover.outputs.packages != '' }}
# USE YOUR ENTERPRISE RUNNER HERE
runs-on: ubuntu-latest-8-cores
strategy:
fail-fast: false
matrix:
python: ["3.9", "3.10", "3.11", "3.12", "3.14"]
name: Unit (Python ${{ matrix.python }})
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python }}
enable-cache: true
- name: Run Tests Concurrently on 8 Cores
env:
NOX_DEFAULT_VENV_BACKEND: uv
run: |
# xargs -P 8 runs up to 8 package tests at the exact same time
echo "${{ needs.discover.outputs.packages }}" | xargs -n 1 -P 8 -I {} sh -c '
cd {} &&
if [ -f "noxfile.py" ]; then
echo "Testing {}..." &&
uvx --with "nox[uv]" nox -s "unit-${{ matrix.python }}"
fi
'