Skip to content

fix(build): derive versions without VERSION #1519

fix(build): derive versions without VERSION

fix(build): derive versions without VERSION #1519

Workflow file for this run

name: check
on:
workflow_dispatch:
push:
branches: ["main"]
tags-ignore: ["**"]
pull_request:
schedule:
- cron: "0 8 * * *"
concurrency:
group: check-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
dist:
uses: $/.github/workflows/dist.yaml
rust:
runs-on: ubuntu-latest
env:
PYTHONPATH: ${{ github.workspace }}/.python-packages
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install Graphviz
run: sudo apt-get install graphviz -y
- name: Install uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
enable-cache: false
- name: Install resolver dependencies
run: uv pip install --target .python-packages 'nab>=0.0.17' 'nab-index>=0.0.17' 'nab-project>=0.0.17'
- name: Check formatting
run: cargo fmt --all --check
- name: Check lints
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Install coverage tool
uses: taiki-e/install-action@0758d235715de2f3551eacc980d9ae8fce9342c3 # v2.87.3
with:
tool: cargo-llvm-cov
- name: Run tests with coverage
run: cargo llvm-cov --no-default-features --test public_api --fail-under-lines 100 --fail-under-functions 100
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
env:
- "pypy-3.11"
- "3.15"
- "3.15t"
- "3.14"
- "3.13"
- "3.12"
- "3.11"
- "3.10"
- type
- docs
- dev
- pkg_meta
exclude:
# Run non-runtime checks only on Linux
- os: windows-latest
env: type
- os: windows-latest
env: docs
- os: windows-latest
env: dev
- os: windows-latest
env: pkg_meta
steps:
- name: Install OS dependencies (Linux)
if: runner.os == 'Linux'
run: sudo apt-get install graphviz -y
- name: Install OS dependencies (Windows)
if: runner.os == 'Windows'
run: |
foreach ($attempt in 1..3) {
choco install graphviz -y --no-progress --fail-on-unfound
if ($LASTEXITCODE -eq 0) { break }
Start-Sleep -Seconds (30 * $attempt)
}
dot -V
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Install the latest version of uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
enable-cache: false
cache-dependency-glob: "pyproject.toml"
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install tox
run: uv tool install --python-preference only-managed --python 3.14 tox --with tox-uv
- name: Install Python
if: (startsWith(matrix.env, '3.') || startsWith(matrix.env, 'pypy-')) && matrix.env != '3.14'
run: uv python install --python-preference only-managed ${{ matrix.env }}
- name: Setup test suite
run: tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.env }}
- name: Run test suite
run: tox run --skip-pkg-install -e ${{ matrix.env }}
env:
PYTEST_ADDOPTS: "-vv --durations=20"
DIFF_AGAINST: HEAD
# The one context branch protection requires, so a matrix that grows or renames its cells needs no ruleset edit.
check:
needs: [dist, rust, test]
if: always()
runs-on: ubuntu-latest
steps:
- name: Fail when a job this one waited on did
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: exit 1