From 2d1cf09d8d288be262f9f29ffa7a17456d34ed9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Mon, 9 Nov 2020 11:33:49 +0100 Subject: [PATCH] ci: only run the canary test on code changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If no Go files changed we do not run the CI. Signed-off-by: Sébastien Han --- .github/workflows/canary-integration-test.yml | 10 +++++++++- .github/workflows/codegen.yml | 5 ++++- .github/workflows/golangci-lint.yaml | 5 +++++ .github/workflows/mod-check.yml | 5 ++++- .github/workflows/unit-test.yml | 5 ++++- 5 files changed, 26 insertions(+), 4 deletions(-) diff --git a/.github/workflows/canary-integration-test.yml b/.github/workflows/canary-integration-test.yml index 22deffdc8..6e4c1e6c0 100644 --- a/.github/workflows/canary-integration-test.yml +++ b/.github/workflows/canary-integration-test.yml @@ -1,5 +1,13 @@ name: Canary integration tests -on: [pull_request] +on: + pull_request: + paths: + - '**.go' + - '**.sh' + - '**.py' + - 'build/**' + - 'tests/**' + - 'images/**' jobs: canary: diff --git a/.github/workflows/codegen.yml b/.github/workflows/codegen.yml index 5f7e72d97..f349d87c0 100644 --- a/.github/workflows/codegen.yml +++ b/.github/workflows/codegen.yml @@ -1,5 +1,8 @@ name: Codegen -on: [pull_request] +on: + pull_request: + paths: + - '**.go' jobs: codegen: diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml index 71e553b85..6dc018a17 100644 --- a/.github/workflows/golangci-lint.yaml +++ b/.github/workflows/golangci-lint.yaml @@ -5,9 +5,14 @@ on: - v* branches: - master + paths: + - '**.go' pull_request: branches: - "master" + paths: + - '**.go' + jobs: golangci: name: golangci-lint diff --git a/.github/workflows/mod-check.yml b/.github/workflows/mod-check.yml index de6877a96..ac173f468 100644 --- a/.github/workflows/mod-check.yml +++ b/.github/workflows/mod-check.yml @@ -1,5 +1,8 @@ name: Mod check -on: [pull_request] +on: + pull_request: + paths: + - '**.go' jobs: modcheck: diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 473eaf52e..5024ccaf0 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -1,5 +1,8 @@ name: Unit tests -on: [pull_request] +on: + pull_request: + paths: + - '**.go' jobs: unittests: