Skip to content

Commit 07db811

Browse files
ci: qualify commit-bound Specs releases (#18)
* ci: qualify commit-bound Specs releases * ci: pin current ecosystem qualification policy * fix: prepare Specs 0.1.5 release candidate
1 parent eaf0e61 commit 07db811

16 files changed

Lines changed: 1645 additions & 59 deletions

‎.github/workflows/ci.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ jobs:
3131
run: uv python install ${{ env.PYTHON_VERSION }}
3232

3333
- name: Install dependencies
34-
run: uv sync --python ${{ env.PYTHON_VERSION }} --dev
34+
run: uv sync --locked --python ${{ env.PYTHON_VERSION }} --dev
3535

3636
- name: Run ruff check
37-
run: uv run ruff check src/ tests/
37+
run: uv run ruff check src/ tests/ scripts/
3838

3939
- name: Run ruff format check
40-
run: uv run ruff format --check src/ tests/
40+
run: uv run ruff format --check src/ tests/ scripts/
4141

4242
typecheck:
4343
name: Type Check
@@ -54,7 +54,7 @@ jobs:
5454
run: uv python install ${{ env.PYTHON_VERSION }}
5555

5656
- name: Install dependencies
57-
run: uv sync --python ${{ env.PYTHON_VERSION }} --dev
57+
run: uv sync --locked --python ${{ env.PYTHON_VERSION }} --dev
5858

5959
- name: Run ty check
6060
run: uv run ty check
@@ -110,7 +110,7 @@ jobs:
110110
allow-prereleases: true
111111

112112
- name: Install dependencies
113-
run: uv sync --python python --dev
113+
run: uv sync --locked --python python --dev
114114

115115
- name: Import package
116116
run: uv run --python python python -c "import ml4t.specs"

‎.github/workflows/docs.yml‎

Lines changed: 36 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,48 +3,54 @@ name: Docs
33
on:
44
push:
55
branches: [main]
6+
pull_request:
7+
branches: [main]
68
workflow_dispatch:
79

8-
permissions:
9-
contents: read
10+
permissions: {}
1011

1112
concurrency:
12-
group: docs
13+
group: docs-${{ github.workflow }}-${{ github.ref }}
1314
cancel-in-progress: true
1415

16+
env:
17+
PYTHON_VERSION: "3.12"
18+
1519
jobs:
1620
build:
17-
name: Build and deploy docs
21+
name: Build revision-identified documentation
1822
runs-on: ubuntu-latest
23+
permissions:
24+
contents: read
1925
steps:
2026
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2127
with:
22-
fetch-depth: 0
23-
24-
- name: Install uv
25-
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
28+
persist-credentials: false
29+
- uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
2630
with:
2731
version: "0.10.9"
28-
29-
- name: Set up Python
30-
run: uv python install 3.12
31-
32-
- name: Install dependencies
33-
run: uv sync --python 3.12 --dev --extra docs
34-
35-
- name: Build docs
36-
run: uv run mkdocs build --strict
37-
38-
- name: Deploy to website repository
39-
uses: cpina/github-action-push-to-another-repository@55306faa4ed53b815ae49e564af8cfb359d32ae2 # v1.7.3
40-
env:
41-
SSH_DEPLOY_KEY: ${{ secrets.DOCS_DEPLOY_KEY }}
32+
- run: uv python install ${{ env.PYTHON_VERSION }}
33+
- run: uv sync --locked --python ${{ env.PYTHON_VERSION }} --dev --extra docs
34+
- name: Record source identity
35+
shell: bash
36+
run: |
37+
echo "ML4T_DOCS_VERSION=$(uv run python -c 'from ml4t.specs import __version__; print(__version__)')" >> "$GITHUB_ENV"
38+
echo "ML4T_DOCS_COMMIT=${GITHUB_SHA}" >> "$GITHUB_ENV"
39+
- name: Execute the README quick start
40+
run: uv run python scripts/run_readme_quickstart.py
41+
- name: Check every README link
42+
run: uv run python scripts/check_readme_links.py README.md
43+
- name: Build and verify documentation
44+
run: |
45+
uv run mkdocs build --strict
46+
uv run python scripts/verify_documentation_identity.py \
47+
--site site \
48+
--expected-library specs \
49+
--expected-version "$ML4T_DOCS_VERSION" \
50+
--expected-commit "$ML4T_DOCS_COMMIT"
51+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
4252
with:
43-
source-directory: site/
44-
destination-github-username: ml4t
45-
destination-repository-name: website
46-
target-directory: static/docs/specs/
47-
target-branch: main
48-
commit-message: "docs(specs): update from ml4t/specs@${{ github.sha }}"
49-
user-name: ml4t-bot
50-
user-email: [email protected]
53+
name: docs-${{ github.sha }}
54+
path: site/
55+
if-no-files-found: error
56+
retention-days: 14

‎.github/workflows/ecosystem.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ jobs:
1717
qualification:
1818
permissions:
1919
contents: read
20-
uses: ml4t/ecosystem/.github/workflows/qualify-library.yml@457678d8860d0c816b1dc376e7e2691daa93af4d # v0.1.0
20+
uses: ml4t/ecosystem/.github/workflows/qualify-library.yml@da2cbb9a9d0b4d2f166ad630470ff7d7a1aa2643 # 2026-09-19 policy snapshot
2121
with:
2222
import-package: ml4t.specs

0 commit comments

Comments
 (0)