From 7e27532e54b97e59a135ae74aa21ddae2f3633bc Mon Sep 17 00:00:00 2001 From: Eric Miller Date: Fri, 27 Feb 2026 10:43:06 -0600 Subject: [PATCH 1/2] ci: detect tests for commit scopes, common files --- .github/workflows/acceptance-tests.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/acceptance-tests.yaml b/.github/workflows/acceptance-tests.yaml index de72074c..844ac10f 100644 --- a/.github/workflows/acceptance-tests.yaml +++ b/.github/workflows/acceptance-tests.yaml @@ -17,6 +17,7 @@ jobs: suites: ${{ steps.changes.outputs.suites }} env: LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }} + PR_TITLE: ${{ github.event.pull_request.title }} steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 with: @@ -39,9 +40,17 @@ jobs: # Get PR labels and changed files git fetch origin ${{ github.event.pull_request.base.ref }} CHANGED_FILES=$(git diff --name-only origin/${{ github.event.pull_request.base.ref }}...HEAD) + COMMIT_SUBJECTS=$(git log --format="%s" origin/${{ github.event.pull_request.base.ref }}...HEAD) + SCOPES=$(printf '%s\n%s' "$PR_TITLE" "$COMMIT_SUBJECTS" | sed -nE 's/^[a-z][a-z0-9_-]*\(([^)]+)\)[!]?:.*/\1/p') ACTIVE_SUITES=() + # Core files that affect all test suites + if echo "$CHANGED_FILES" | grep -qE "^(go\.(mod|sum)|main\.go|coreweave/(client|retry|s3)\.go)$"; then + ACTIVE_SUITES=($ALL_SUITES) + echo "Running all suites due to core file changes" + fi + # Check for run-all label if has_label "acceptance-test:all"; then ACTIVE_SUITES=($ALL_SUITES) @@ -55,6 +64,10 @@ jobs: if has_label "acceptance-test:$suite"; then ACTIVE_SUITES+=("$suite") echo "✓ $suite: enabled by label" + # Check commit scope in PR title and commit messages + elif echo "$SCOPES" | grep -qx "$suite"; then + ACTIVE_SUITES+=("$suite") + echo "✓ $suite: enabled by commit scope" # Check internal/provider (affects all suites) elif echo "$CHANGED_FILES" | grep -q "^internal/provider/"; then ACTIVE_SUITES+=("$suite") From 41602095ec1da0ef0dae83fd1826b15ad93aa30d Mon Sep 17 00:00:00 2001 From: Eric Miller <1588827+sosheskaz@users.noreply.github.com> Date: Fri, 6 Mar 2026 14:59:40 -0600 Subject: [PATCH 2/2] fix: apply suggestions from code review Co-authored-by: Cesar Garza --- .github/workflows/acceptance-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/acceptance-tests.yaml b/.github/workflows/acceptance-tests.yaml index 844ac10f..25338879 100644 --- a/.github/workflows/acceptance-tests.yaml +++ b/.github/workflows/acceptance-tests.yaml @@ -46,7 +46,7 @@ jobs: ACTIVE_SUITES=() # Core files that affect all test suites - if echo "$CHANGED_FILES" | grep -qE "^(go\.(mod|sum)|main\.go|coreweave/(client|retry|s3)\.go)$"; then + if echo "$CHANGED_FILES" | grep -qE "^(go\.(mod|sum)|main\.go|coreweave/(client|retry|s3)(_test)?\.go)$"; then ACTIVE_SUITES=($ALL_SUITES) echo "Running all suites due to core file changes" fi