From 61f9d270f0299229ac83b119b233f5865efaef61 Mon Sep 17 00:00:00 2001 From: enginerd-kr Date: Fri, 3 Apr 2026 22:59:41 +0900 Subject: [PATCH 1/3] ci: skip lint-and-test job when no code changes detected Use dorny/paths-filter to detect code-related file changes and skip the lint-and-test job for non-code PRs (docs, config, etc.). Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/pr-checks.yml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index b9fdfc9..9fe6a30 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -12,7 +12,29 @@ permissions: id-token: write jobs: + changes: + runs-on: ubuntu-latest + outputs: + code: ${{ steps.filter.outputs.code }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Detect code changes + uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + code: + - 'chronis/**' + - 'tests/**' + - 'pyproject.toml' + - 'uv.lock' + - '.github/workflows/pr-checks.yml' + lint-and-test: + needs: changes + if: needs.changes.outputs.code == 'true' runs-on: ubuntu-latest steps: @@ -52,8 +74,8 @@ jobs: MINIMUM_ORANGE: 60 claude-review-and-label: - needs: lint-and-test - if: github.event.pull_request.head.repo.full_name == github.repository + needs: [changes, lint-and-test] + if: always() && github.event.pull_request.head.repo.full_name == github.repository && (needs.lint-and-test.result == 'success' || needs.lint-and-test.result == 'skipped') runs-on: ubuntu-latest steps: From e86a356f0fbcee1919fb1b36476c3bb9c54ddd37 Mon Sep 17 00:00:00 2001 From: enginerd-kr Date: Fri, 3 Apr 2026 23:05:11 +0900 Subject: [PATCH 2/3] ci: include examples/ in code-change detection paths examples/ contains executable Python covered by ruff check, so changes there should trigger lint-and-test. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/pr-checks.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 9fe6a30..a36a483 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -28,6 +28,7 @@ jobs: code: - 'chronis/**' - 'tests/**' + - 'examples/**' - 'pyproject.toml' - 'uv.lock' - '.github/workflows/pr-checks.yml' From 6b7c65d5d8378f6478f202b2926f75663a254a37 Mon Sep 17 00:00:00 2001 From: enginerd-kr Date: Fri, 3 Apr 2026 23:13:31 +0900 Subject: [PATCH 3/3] ci: add changes job success guard to claude-review-and-label If the changes job fails (e.g. checkout or paths-filter error), lint-and-test is skipped and the label job could still run due to always(). Add explicit needs.changes.result == 'success' check. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/pr-checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index a36a483..46cf8bb 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -76,7 +76,7 @@ jobs: claude-review-and-label: needs: [changes, lint-and-test] - if: always() && github.event.pull_request.head.repo.full_name == github.repository && (needs.lint-and-test.result == 'success' || needs.lint-and-test.result == 'skipped') + if: always() && needs.changes.result == 'success' && github.event.pull_request.head.repo.full_name == github.repository && (needs.lint-and-test.result == 'success' || needs.lint-and-test.result == 'skipped') runs-on: ubuntu-latest steps: