Harden Planemo support (pin + test-report schema + CLI pages + convert Mold) #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Planemo vendored drift | |
| # Reruns the planemo sync scripts in --check / dry-run mode against the pinned | |
| # planemo SHA and fails if any vendored artifact would change. Heavyweight (it | |
| # installs planemo) so we scope it to planemo-touching PRs. | |
| on: | |
| pull_request: | |
| paths: | |
| - "content/cli/planemo/**" | |
| - "packages/planemo-cli-meta/**" | |
| - "packages/planemo-test-report-schema/**" | |
| - "scripts/sync-planemo-cli.ts" | |
| - ".github/workflows/planemo-drift.yml" | |
| push: | |
| branches: [main] | |
| paths: | |
| - "content/cli/planemo/**" | |
| - "packages/planemo-cli-meta/**" | |
| - "packages/planemo-test-report-schema/**" | |
| - "scripts/sync-planemo-cli.ts" | |
| - ".github/workflows/planemo-drift.yml" | |
| permissions: | |
| contents: read | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Enable corepack | |
| run: corepack enable | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Read pinned planemo SHA | |
| id: pin | |
| run: | | |
| set -euo pipefail | |
| sha=$(grep -E '^package_version:' content/cli/planemo/index.md | sed -E 's/.*planemo@([0-9a-f]+).*/\1/') | |
| if [ -z "$sha" ]; then | |
| echo "No SHA found in content/cli/planemo/index.md package_version" >&2 | |
| exit 1 | |
| fi | |
| echo "sha=$sha" >> "$GITHUB_OUTPUT" | |
| - name: Install pinned planemo | |
| run: python -m pip install "planemo @ git+https://github.com/jmchilton/planemo@${{ steps.pin.outputs.sha }}" | |
| - name: Check planemo CLI page drift | |
| run: npm run check:planemo-cli | |
| - name: Check vendored cli-meta drift | |
| run: | | |
| set -euo pipefail | |
| pnpm --filter @galaxy-foundry/planemo-cli-meta run sync:from-planemo | |
| pnpm --filter @galaxy-foundry/planemo-cli-meta run sync | |
| # Gate the canonical JSON sources and the generated TS mirrors. If the | |
| # JSON drifted, the .ts files will too — but we keep both in the gate | |
| # because contributors might regenerate only one half locally. | |
| if ! git diff --quiet -- 'packages/planemo-cli-meta/src/*.json' 'packages/planemo-cli-meta/src/*.generated.ts'; then | |
| echo "::error::packages/planemo-cli-meta/src drift detected — run 'make sync-planemo-cli-meta' and commit." >&2 | |
| git --no-pager diff -- 'packages/planemo-cli-meta/src/*.json' 'packages/planemo-cli-meta/src/*.generated.ts' | |
| exit 1 | |
| fi | |
| - name: Check vendored test-report schema drift | |
| run: | | |
| set -euo pipefail | |
| pnpm --filter @galaxy-foundry/planemo-test-report-schema run sync:from-planemo | |
| pnpm --filter @galaxy-foundry/planemo-test-report-schema run sync | |
| if ! git diff --quiet -- 'packages/planemo-test-report-schema/src/*.json' 'packages/planemo-test-report-schema/src/*.generated.ts'; then | |
| echo "::error::packages/planemo-test-report-schema/src drift detected — run 'make sync-planemo-test-report-schema' and commit." >&2 | |
| git --no-pager diff -- 'packages/planemo-test-report-schema/src/*.json' 'packages/planemo-test-report-schema/src/*.generated.ts' | |
| exit 1 | |
| fi |