fix(ci): CIワークフローの二重実行を修正 - #2
Merged
Merged
Conversation
integration.yaml triggered on both push (branches-ignore: main/master) and pull_request, so pushing to a PR branch fired the workflow twice (push + pull_request synchronize), running commitlint/ruff/mypy/pytest jobs redundantly. Consolidate to pull_request only, since main/master were already excluded from the push trigger and no direct-push-to- protected-branch check was in play. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
問題
.github/workflows/integration.yamlのon:がpush(branches-ignore: main, master) とpull_request(ブランチ制限なし) の両方を含んでいました。そのため、PRブランチへpushするとpushイベントとpull_request(synchronize) イベントが同時に発火し、commitlint/ruff/mypy/pytest の各ジョブが二重に実行されていました。修正内容
integration.yamlのトリガーをpull_requestのみに一本化し、pushトリガーを削除しました。pushトリガーは main/master を除外していたため、保護ブランチへの直push検証を目的としたものではなく、単純な重複トリガーと判断しました。deployment.yamlはpull_request(closed) とworkflow_dispatchのみで構成されており、同種の重複は無かったため変更していません。補足
commitlintジョブに残っているif: github.event_name == 'push'の分岐は、pushトリガーが無くなったことで実質到達しなくなりますが、ジョブ内容には手を入れない方針のため今回は変更していません。必要であれば別途整理をご検討ください。🤖 Generated with Claude Code