From 860e1a5a98e15d10de2cbb1160c20174e512e464 Mon Sep 17 00:00:00 2001 From: per1234 Date: Tue, 15 Oct 2024 06:59:21 -0700 Subject: [PATCH] Add support to "Test Go" workflow for alternative Codecov configuration paths For the sake of efficiency, the "Test Go" GitHub Actions workflow is configured to run only when relevant files are modified. Since the workflow uploads code coverage data to Codecov, the Codecov configuration file is one of these files. The standard filename for the Codecov configuration file is codecov.yml, and the workflow's path filter was configured for that filename. It turns out an alternative filename is also recognized: .codecov.yml. Two subfolders are also supported in addition to the root of the repository as locations for the configuration file. The workflow's paths filter was not configured for the alternative filename and locations, meaning the workflow would not be triggered on change to the Codecov configuration in projects that use the alternative configuration file name or locations. The workflow's paths filter is hereby configured to recognize changes to any valid Codecov configuration file. --- .github/workflows/test-go-task.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-go-task.yml b/.github/workflows/test-go-task.yml index 2b14512b..f5839d66 100644 --- a/.github/workflows/test-go-task.yml +++ b/.github/workflows/test-go-task.yml @@ -11,7 +11,9 @@ on: push: paths: - ".github/workflows/test-go-task.ya?ml" - - "codecov.ya?ml" + - ".github/.?codecov.ya?ml" + - "dev/.?codecov.ya?ml" + - ".?codecov.ya?ml" - "**/go.mod" - "**/go.sum" - "Taskfile.ya?ml" @@ -20,7 +22,9 @@ on: pull_request: paths: - ".github/workflows/test-go-task.ya?ml" - - "codecov.ya?ml" + - ".github/.?codecov.ya?ml" + - "dev/.?codecov.ya?ml" + - ".?codecov.ya?ml" - "**/go.mod" - "**/go.sum" - "Taskfile.ya?ml"