Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 109 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- 'Makefile'
- '.github/workflows/ci.yml'

Comment thread
piekstra marked this conversation as resolved.
build-test-cfl:
build-test-cfl-run:
needs: detect-changes
if: needs.detect-changes.outputs.cfl == 'true' || needs.detect-changes.outputs.shared == 'true'
runs-on: ubuntu-latest
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Test cfl
run: go test -v -race -coverprofile=coverage-cfl.out ./tools/cfl/...

build-test-jtk:
build-test-jtk-run:
needs: detect-changes
if: needs.detect-changes.outputs.jtk == 'true' || needs.detect-changes.outputs.shared == 'true'
runs-on: ubuntu-latest
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
- name: Test jtk
run: go test -v -race -coverprofile=coverage-jtk.out ./tools/jtk/...

lint-cfl:
lint-cfl-run:
needs: detect-changes
if: needs.detect-changes.outputs.cfl == 'true' || needs.detect-changes.outputs.shared == 'true'
runs-on: ubuntu-latest
Expand All @@ -120,7 +120,7 @@ jobs:
working-directory: tools/cfl
version: v2.12.2

lint-jtk:
lint-jtk-run:
needs: detect-changes
if: needs.detect-changes.outputs.jtk == 'true' || needs.detect-changes.outputs.shared == 'true'
runs-on: ubuntu-latest
Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:
# packaging/identity.yml matches its tool-native files. working-directory is
# the tool root; repo-root defaults to "." so the root-relative
# goreleaser_config resolves (distribution.md §8.3 / .github#15).
identity-check-cfl:
identity-check-cfl-run:
needs: detect-changes
if: needs.detect-changes.outputs.cfl == 'true' || needs.detect-changes.outputs.shared == 'true'
runs-on: ubuntu-latest
Expand All @@ -190,7 +190,7 @@ jobs:
with:
working-directory: tools/cfl

identity-check-jtk:
identity-check-jtk-run:
needs: detect-changes
if: needs.detect-changes.outputs.jtk == 'true' || needs.detect-changes.outputs.shared == 'true'
runs-on: ubuntu-latest
Expand All @@ -207,3 +207,106 @@ jobs:
- uses: open-cli-collective/.github/actions/pr-title@v1
with:
title: ${{ github.event.pull_request.title }}

Comment thread
piekstra marked this conversation as resolved.
# Required-check wrappers (INT-726). Branch protection requires these
# names, and GitHub does not accept a skipped check as satisfied, so a
# PR touching one tool could not merge without an admin bypass. Each
# wrapper always runs and reports the outcome of the job that does the
# work, treating "skipped" as a pass because there was nothing to do.
# The guard lives here alone, so steps added to the -run jobs need no
# per-step condition.
build-test-cfl:
needs: build-test-cfl-run
if: always()
runs-on: ubuntu-latest
steps:
- name: Report build-test-cfl-run outcome
env:
RESULT: ${{ needs.build-test-cfl-run.result }}
run: |
set -euo pipefail
case "$RESULT" in
success) echo "ran and passed" ;;
skipped) echo "no changes for this tool; nothing to verify" ;;
Comment thread
piekstra marked this conversation as resolved.
Outdated
*) echo "job result: $RESULT"; exit 1 ;;
esac

build-test-jtk:
needs: build-test-jtk-run
if: always()
runs-on: ubuntu-latest
steps:
- name: Report build-test-jtk-run outcome
env:
RESULT: ${{ needs.build-test-jtk-run.result }}
run: |
set -euo pipefail
case "$RESULT" in
success) echo "ran and passed" ;;
skipped) echo "no changes for this tool; nothing to verify" ;;
*) echo "job result: $RESULT"; exit 1 ;;
esac

lint-cfl:
needs: lint-cfl-run
if: always()
runs-on: ubuntu-latest
steps:
- name: Report lint-cfl-run outcome
env:
RESULT: ${{ needs.lint-cfl-run.result }}
run: |
set -euo pipefail
case "$RESULT" in
success) echo "ran and passed" ;;
skipped) echo "no changes for this tool; nothing to verify" ;;
*) echo "job result: $RESULT"; exit 1 ;;
esac

lint-jtk:
needs: lint-jtk-run
if: always()
runs-on: ubuntu-latest
steps:
- name: Report lint-jtk-run outcome
env:
RESULT: ${{ needs.lint-jtk-run.result }}
run: |
set -euo pipefail
case "$RESULT" in
success) echo "ran and passed" ;;
skipped) echo "no changes for this tool; nothing to verify" ;;
*) echo "job result: $RESULT"; exit 1 ;;
esac

identity-check-cfl:
needs: identity-check-cfl-run
if: always()
runs-on: ubuntu-latest
steps:
- name: Report identity-check-cfl-run outcome
env:
RESULT: ${{ needs.identity-check-cfl-run.result }}
run: |
set -euo pipefail
case "$RESULT" in
success) echo "ran and passed" ;;
skipped) echo "no changes for this tool; nothing to verify" ;;
*) echo "job result: $RESULT"; exit 1 ;;
esac

identity-check-jtk:
needs: identity-check-jtk-run
if: always()
runs-on: ubuntu-latest
steps:
- name: Report identity-check-jtk-run outcome
env:
RESULT: ${{ needs.identity-check-jtk-run.result }}
run: |
set -euo pipefail
case "$RESULT" in
success) echo "ran and passed" ;;
skipped) echo "no changes for this tool; nothing to verify" ;;
*) echo "job result: $RESULT"; exit 1 ;;
esac
Loading