diff --git a/.github/workflows/ci-core.yml b/.github/workflows/ci-core.yml index e22615a6edf..77b2fb91212 100644 --- a/.github/workflows/ci-core.yml +++ b/.github/workflows/ci-core.yml @@ -48,6 +48,8 @@ jobs: with: persist-credentials: false repository: smartcontractkit/chainlink + fetch-depth: 0 # fetch all history to determine changed files for PRs/pushes/merges + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: match-some with: @@ -96,6 +98,68 @@ jobs: all: - '**' + - name: Decide which tests to run (rollout-only) + # To validate that this properly tests, we will run this beside the dorny/paths-filter actions + # before using it's output to actually gate any jobs. + # See: https://github.com/smartcontractkit/chainlink/commit/85434059d7ed24500107d3074f432dc0d2a88006 for end-state. + id: triggers + uses: smartcontractkit/.github/actions/advanced-triggers@advanced-triggers/v1 + with: + file-sets: | + go-files: + - "**/*.go" + - "**/go.mod" + - "**/go.sum" + core-files: + - "core/**" + all-test-files: + - "**/testdata/**" + - "**/*_test.go" + core-test-files: + - "testdata/**" + - "core/**/testdata/**" + - "core/**/*_test.go" + e2e-tests-files: + - "system-tests/**" + - "integration-tests/**" + workflow-files: + - ".github/workflows/ci-core.yml" + - ".github/actions/**/*.y*ml" + deployment-files: + - "deployment/**" + # Note: + # - pull_request, merge_group, and push events will resolve to true if any changed files match the path/glob patterns + # - exclusion-sets/negations are applied first, and therefore filter all changed files before inclusion sets are applied + # - by default these will resolve to true for schedule, and workflow_dispatch events + triggers: | + core-tests: + exclusion-sets: [ e2e-tests-files, deployment-files ] + inclusion-sets: [ go-files, core-files, all-test-files, workflow-files ] + paths: + - "tools/bin/go_core_tests" + core-fuzz-tests: + exclusion-sets: [ e2e-tests-files, deployment-files ] + inclusion-sets: [ go-files, core-files, all-test-files, workflow-files ] + paths: + - "!**/testdata/**" + - "**/fuzz/**" + - "tools/bin/go_core_fuzz" + core-race-tests: + exclusion-sets: [ e2e-tests-files, deployment-files ] + inclusion-sets: [ go-files, core-files, all-test-files, workflow-files ] + paths: + - "tools/bin/go_core_race_tests" + core-integration-tests: + exclusion-sets: [ e2e-tests-files, deployment-files ] + inclusion-sets: [ go-files, core-files, all-test-files, workflow-files ] + paths: + - "tools/bin/go_core_tests_integration" + deployment-tests: + exclusion-sets: [ e2e-tests-files, core-test-files ] + inclusion-sets: [ go-files, core-files, deployment-files, workflow-files ] + paths: + - "tools/bin/go_core_ccip_deployment_tests" + - name: Changed modules id: changed-modules uses: smartcontractkit/.github/actions/changed-modules-go@changed-modules-go/v1