diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4078ee62..f3d4af51 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -132,12 +132,39 @@ jobs: fail_ci_if_error: false # ============================================================================ - # Haskell Jobs (registry) + # Haskell Jobs (registry) — dormant-ready. + # The Haskell sub-project (registry/) is currently absent (its source was + # removed). `detect-haskell` gates the Haskell jobs on the presence of + # registry/hypatia.cabal so they SKIP cleanly while it is gone and + # re-activate automatically the moment it lands again. This realises the + # intent that was previously only described in a comment but never enforced, + # which left haskell-build and haskell-lint failing unconditionally. # ============================================================================ + detect-haskell: + name: Detect Haskell tree + runs-on: ubuntu-latest + timeout-minutes: 5 + outputs: + present: ${{ steps.check.outputs.present }} + steps: + - name: Checkout repository + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + - name: Check for registry/hypatia.cabal + id: check + run: | + if [ -f registry/hypatia.cabal ]; then + echo "present=true" >> "$GITHUB_OUTPUT" + else + echo "present=false" >> "$GITHUB_OUTPUT" + echo "::notice::registry/hypatia.cabal absent — Haskell build/lint jobs skipped (dormant)." + fi + haskell-build: name: Haskell Build & Test runs-on: ubuntu-latest timeout-minutes: 60 + needs: detect-haskell + if: needs.detect-haskell.outputs.present == 'true' # registry/ is the Haskell sub-project; gate this job on its presence so # PRs that don't touch (and don't ship) the Haskell tree don't fail here. # The job re-activates the moment `registry/hypatia.cabal` lands. @@ -195,6 +222,8 @@ jobs: name: HLint runs-on: ubuntu-latest timeout-minutes: 60 + needs: detect-haskell + if: needs.detect-haskell.outputs.present == 'true' steps: - name: Checkout repository uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 @@ -205,7 +234,7 @@ jobs: version: '3.8' - name: Run HLint - uses: haskell-actions/hlint-run@0b0024319753ba0c8b2fa21b7018ed252aed8181 # v2.4.9 + uses: haskell-actions/hlint-run@eaca4cfbf4a69f4eb875df38b6bc3e1657020378 # v2.4.10 with: path: registry/ fail-on: warning