Skip to content

Unit Tests (fal)

Unit Tests (fal) #2367

name: Unit Tests (fal)
on:
push:
branches: [main]
paths:
- "projects/fal/**"
- ".github/workflows/fal-unit-tests.yml"
pull_request:
types: [assigned, opened, synchronize, reopened]
paths:
- "projects/fal/**"
- ".github/workflows/fal-unit-tests.yml"
schedule:
- cron: "30 5 * * *" # every day at 5:30 UTC
workflow_dispatch:
# Called by release.yaml so a release re-runs the suite against a fresh
# dependency resolution rather than trusting a possibly-stale green run.
workflow_call:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
jobs:
unit:
name: unit (${{ matrix.os }}, py ${{ matrix.python }}, ${{ matrix.deps }})
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
deps: ["pydantic==1.10.18", "pydantic==2.13.3"]
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
# pydantic 1.10.18 runs on the oldest supported interpreter only
exclude:
- deps: "pydantic==1.10.18"
python: "3.11"
- deps: "pydantic==1.10.18"
python: "3.12"
- deps: "pydantic==1.10.18"
python: "3.13"
- deps: "pydantic==1.10.18"
python: "3.14"
include:
- os: windows-2022
deps: "pydantic==2.13.3"
python: "3.12"
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 0
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: ${{ matrix.python }}
cache: pip
- name: Install dependencies
run: |
pip install --upgrade pip wheel
pip install -e 'projects/fal[test]' ${{ matrix.deps }}
- name: Run unit tests
run: |
pytest -n auto -v projects/fal/tests/unit