Skip to content

Release v0.0.9

Release v0.0.9 #35

Workflow file for this run

name: QA
on:
pull_request:
push:
branches:
- main
jobs:
QA:
name: QA checks
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: .python-version
- name: Sync packages
run: uv sync --locked --all-packages
- name: Check import sorting
run: uv run ruff check --select I .
- name: Check formatting
run: uv run ruff format --check .
- name: Type check package
run: uv run ty check .
- name: Contract tests
run: uv run pytest -n auto
benchmark:
name: Performance benchmark
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Check out base repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.sha }}
path: .benchmark/base
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: .python-version
- name: Sync packages
run: uv sync --locked --all-packages
- name: Benchmark generation (base)
run: >
uv run python scripts/benchmark_generate.py run --package-path
.benchmark/base --spec tests/performance/nautobot.json.gz --repeat 5
--warmup 1 --output .benchmark/base.json
- name: Benchmark generation (current)
run: >
uv run python scripts/benchmark_generate.py run --package-path .
--spec tests/performance/nautobot.json.gz --repeat 5 --warmup 1
--output .benchmark/current.json
- name: Check generation regression
run: >
uv run python scripts/benchmark_generate.py compare --baseline
.benchmark/base.json --candidate .benchmark/current.json
--max-regression 0.02
- name: Measure generated file sizes (base)
run: >
uv run python scripts/benchmark_generate.py size --package-path
.benchmark/base --spec tests/performance/nautobot.json.gz
--output .benchmark/base-size.json
- name: Measure generated file sizes (current)
run: >
uv run python scripts/benchmark_generate.py size --package-path .
--spec tests/performance/nautobot.json.gz
--output .benchmark/current-size.json
- name: Check generated file size regression
run: >
uv run python scripts/benchmark_generate.py compare-size --baseline
.benchmark/base-size.json --candidate .benchmark/current-size.json
--max-regression 0.02