Keep CRLF line endings in arbiter-kontrakt.yml
arbiter-kontrakt / contract (push) Successful in 1m49s
arbiter-kontrakt / contract (push) Successful in 1m49s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,87 +1,87 @@
|
||||
name: arbiter-kontrakt
|
||||
# The engine contract: does the real compass_analysis still honour what Arbiter's
|
||||
# app/services/engine.py believes (the command line, exit codes 0/2/3, a report carrying
|
||||
# schema_version and the counsel disclaimer, the clause file)? arbiter.yml cannot ask: its paths
|
||||
# filter is apps/arbiter/**, and `paths` filters a whole workflow, never one job, so a change in
|
||||
# packages/* that breaks Arbiter would start nothing. Hence a workflow of its own, filtered on the
|
||||
# engine's side too. (Compass's until its engine left with the contracts, split plan M5, 0030.)
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
# compass-analysis's closure is every package but evals (`uv sync --package
|
||||
# compass-analysis`, 24.09); a hand-picked list would go stale with its next dependency.
|
||||
- "packages/**"
|
||||
- "pyproject.toml"
|
||||
- "uv.lock"
|
||||
- "apps/arbiter/backend/app/services/engine*.py"
|
||||
- "apps/arbiter/backend/app/services/clauses*.py"
|
||||
# The contract test imports AnalysisMode and SourceFormat from here.
|
||||
- "apps/arbiter/backend/app/enums.py"
|
||||
- "apps/arbiter/backend/tests/test_engine_contract.py"
|
||||
- ".github/workflows/arbiter-kontrakt.yml"
|
||||
pull_request:
|
||||
paths:
|
||||
- "packages/**"
|
||||
- "pyproject.toml"
|
||||
- "uv.lock"
|
||||
- "apps/arbiter/backend/app/services/engine*.py"
|
||||
- "apps/arbiter/backend/app/services/clauses*.py"
|
||||
- "apps/arbiter/backend/app/enums.py"
|
||||
- "apps/arbiter/backend/tests/test_engine_contract.py"
|
||||
- ".github/workflows/arbiter-kontrakt.yml"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
# dredd-core is private on the Haski Gitea, and so is every repository this workflow may fetch.
|
||||
# All git traffic to the Gitea host (pip installing dredd-core from requirements, above all) goes
|
||||
# through the read-only bot haski-reader: its token is the Haski org secret DREDD_CORE_TOKEN,
|
||||
# which Gitea masks in logs. Docker builds get the same token as a BuildKit secret instead.
|
||||
env:
|
||||
GIT_CONFIG_COUNT: "1"
|
||||
GIT_CONFIG_KEY_0: url.http://x-access-token:${{ secrets.DREDD_CORE_TOKEN }}@77.216.148.202:3000/.insteadOf
|
||||
GIT_CONFIG_VALUE_0: http://77.216.148.202:3000/
|
||||
|
||||
jobs:
|
||||
contract:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
env:
|
||||
UV_PYTHON: "3.12"
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-python@v6
|
||||
with: { python-version: "3.12" }
|
||||
# A full tag: since v8 setup-uv publishes immutable releases only, with no moving @v10.
|
||||
- uses: astral-sh/setup-uv@v10.2.0
|
||||
with:
|
||||
version: "0.11.16" # the pin in apps/arbiter/backend/Dockerfile
|
||||
- name: Install the engine the way the image does
|
||||
# --package: compass-analysis and its closure only, as apps/arbiter/backend/Dockerfile
|
||||
# installs it, so the contract is checked against what Arbiter really runs. `uv lock
|
||||
# --check` first, because --frozen never compares the lock with pyproject.toml. The dev
|
||||
# group (pytest, pytest-asyncio) belongs to the workspace root and --package leaves it
|
||||
# out, so it goes in on top; --inexact keeps the engine.
|
||||
run: |
|
||||
uv lock --check
|
||||
uv sync --package compass-analysis --frozen
|
||||
uv sync --only-group dev --inexact --frozen
|
||||
- name: Engine tests (analysis, ingestion)
|
||||
# Four tests in test_locate.py skip here: the gold set is not versioned.
|
||||
run: uv run --no-sync pytest packages/analysis packages/ingestion
|
||||
- name: Install Arbiter deps
|
||||
working-directory: apps/arbiter/backend
|
||||
run: pip install -r requirements-dev.txt
|
||||
- name: The engine contract, against the engine installed above
|
||||
working-directory: apps/arbiter/backend
|
||||
env:
|
||||
COMPASS_ENGINE_PYTHON: ${{ github.workspace }}/.venv/bin/python
|
||||
# Without that variable the tier skips and this step would pass on nothing, so a skip
|
||||
# fails it.
|
||||
run: |
|
||||
set -o pipefail
|
||||
pytest -rs tests/test_engine_contract.py | tee contract.log
|
||||
if grep -qiE "^SKIPPED|[0-9]+ skipped" contract.log; then
|
||||
echo "::error::the engine contract was skipped"; exit 1
|
||||
fi
|
||||
name: arbiter-kontrakt
|
||||
# The engine contract: does the real compass_analysis still honour what Arbiter's
|
||||
# app/services/engine.py believes (the command line, exit codes 0/2/3, a report carrying
|
||||
# schema_version and the counsel disclaimer, the clause file)? arbiter.yml cannot ask: its paths
|
||||
# filter is apps/arbiter/**, and `paths` filters a whole workflow, never one job, so a change in
|
||||
# packages/* that breaks Arbiter would start nothing. Hence a workflow of its own, filtered on the
|
||||
# engine's side too. (Compass's until its engine left with the contracts, split plan M5, 0030.)
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
# compass-analysis's closure is every package but evals (`uv sync --package
|
||||
# compass-analysis`, 24.09); a hand-picked list would go stale with its next dependency.
|
||||
- "packages/**"
|
||||
- "pyproject.toml"
|
||||
- "uv.lock"
|
||||
- "apps/arbiter/backend/app/services/engine*.py"
|
||||
- "apps/arbiter/backend/app/services/clauses*.py"
|
||||
# The contract test imports AnalysisMode and SourceFormat from here.
|
||||
- "apps/arbiter/backend/app/enums.py"
|
||||
- "apps/arbiter/backend/tests/test_engine_contract.py"
|
||||
- ".github/workflows/arbiter-kontrakt.yml"
|
||||
pull_request:
|
||||
paths:
|
||||
- "packages/**"
|
||||
- "pyproject.toml"
|
||||
- "uv.lock"
|
||||
- "apps/arbiter/backend/app/services/engine*.py"
|
||||
- "apps/arbiter/backend/app/services/clauses*.py"
|
||||
- "apps/arbiter/backend/app/enums.py"
|
||||
- "apps/arbiter/backend/tests/test_engine_contract.py"
|
||||
- ".github/workflows/arbiter-kontrakt.yml"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
# dredd-core is private on the Haski Gitea, and so is every repository this workflow may fetch.
|
||||
# All git traffic to the Gitea host (pip installing dredd-core from requirements, above all) goes
|
||||
# through the read-only bot haski-reader: its token is the Haski org secret DREDD_CORE_TOKEN,
|
||||
# which Gitea masks in logs. Docker builds get the same token as a BuildKit secret instead.
|
||||
env:
|
||||
GIT_CONFIG_COUNT: "1"
|
||||
GIT_CONFIG_KEY_0: url.http://x-access-token:${{ secrets.DREDD_CORE_TOKEN }}@77.216.148.202:3000/.insteadOf
|
||||
GIT_CONFIG_VALUE_0: http://77.216.148.202:3000/
|
||||
|
||||
jobs:
|
||||
contract:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
env:
|
||||
UV_PYTHON: "3.12"
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-python@v6
|
||||
with: { python-version: "3.12" }
|
||||
# A full tag: since v8 setup-uv publishes immutable releases only, with no moving @v10.
|
||||
- uses: astral-sh/setup-uv@v10.2.0
|
||||
with:
|
||||
version: "0.11.16" # the pin in apps/arbiter/backend/Dockerfile
|
||||
- name: Install the engine the way the image does
|
||||
# --package: compass-analysis and its closure only, as apps/arbiter/backend/Dockerfile
|
||||
# installs it, so the contract is checked against what Arbiter really runs. `uv lock
|
||||
# --check` first, because --frozen never compares the lock with pyproject.toml. The dev
|
||||
# group (pytest, pytest-asyncio) belongs to the workspace root and --package leaves it
|
||||
# out, so it goes in on top; --inexact keeps the engine.
|
||||
run: |
|
||||
uv lock --check
|
||||
uv sync --package compass-analysis --frozen
|
||||
uv sync --only-group dev --inexact --frozen
|
||||
- name: Engine tests (analysis, ingestion)
|
||||
# Four tests in test_locate.py skip here: the gold set is not versioned.
|
||||
run: uv run --no-sync pytest packages/analysis packages/ingestion
|
||||
- name: Install Arbiter deps
|
||||
working-directory: apps/arbiter/backend
|
||||
run: pip install -r requirements-dev.txt
|
||||
- name: The engine contract, against the engine installed above
|
||||
working-directory: apps/arbiter/backend
|
||||
env:
|
||||
COMPASS_ENGINE_PYTHON: ${{ github.workspace }}/.venv/bin/python
|
||||
# Without that variable the tier skips and this step would pass on nothing, so a skip
|
||||
# fails it.
|
||||
run: |
|
||||
set -o pipefail
|
||||
pytest -rs tests/test_engine_contract.py | tee contract.log
|
||||
if grep -qiE "^SKIPPED|[0-9]+ skipped" contract.log; then
|
||||
echo "::error::the engine contract was skipped"; exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user