Skip to content

Review: what changed folds into the version row #1237

Review: what changed folds into the version row

Review: what changed folds into the version row #1237

Workflow file for this run

name: ci
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
# Superseded PR commits need no more runner time; main checks must finish independently.
concurrency:
group: ci-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
# Pull requests that only change workflow packages skip the browser suite.
changes:
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
pull-requests: read
outputs:
browser: ${{ github.event_name == 'push' || steps.filter.outputs.browser == 'true' }}
steps:
- if: github.event_name == 'pull_request'
id: filter
uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
with:
predicate-quantifier: every
filters: |
browser:
- "**"
- "!workflow_packages/**"
python:
runs-on: ubuntu-latest
timeout-minutes: 15
services:
postgres:
image: postgres:17
env:
POSTGRES_USER: tin_test
POSTGRES_PASSWORD: tin_test
POSTGRES_DB: tin_test
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U tin_test"
--health-interval 5s
--health-timeout 5s
--health-retries 10
env:
TIN_LITE_TEST_DATABASE_DSN: postgresql://tin_test:tin_test@127.0.0.1:5432/tin_test
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@v10.0.1
with:
enable-cache: true
- run: uv python install 3.12
- run: uv sync --frozen
- run: uv run ruff format --check .
- run: uv run ruff check .
- run: uv run pytest -n auto
- run: uv run lint-imports
browser:
needs: changes
if: needs.changes.outputs.browser == 'true'
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@v10.0.1
with:
enable-cache: true
- uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
- run: uv python install 3.12
- run: uv sync --frozen
- run: npm ci --ignore-scripts --no-audit --no-fund
- run: npm run check:diagrams
- run: npm run check:comparison
- uses: actions/cache@v6.1.0
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- run: npx playwright install --with-deps chromium
- run: npm run test:browser
# The required status check; a skipped browser job counts as passed.
verify:
needs: [python, browser]
if: always()
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: |
echo "python: ${{ needs.python.result }}, browser: ${{ needs.browser.result }}"
exit 1
- run: echo "python and browser checks passed"
# Fast package feedback; the full verify job remains required before merging.
contributions:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@v10.0.1
with:
enable-cache: true
- run: uv python install 3.12
- run: uv sync --frozen
- run: uv run tin-lite validate-community
- run: uv run python -m tin_lite.workflow_qualification_cli check workflow_packages/example.csv_summary/workflow.json
- uses: actions/setup-node@v6
with:
node-version: 22
- run: node --test .github/scripts/contributor-gate.test.mjs