Skip to content

Commit 860e1a5

Browse files
committed
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.
1 parent e3cab86 commit 860e1a5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/test-go-task.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ on:
1111
push:
1212
paths:
1313
- ".github/workflows/test-go-task.ya?ml"
14-
- "codecov.ya?ml"
14+
- ".github/.?codecov.ya?ml"
15+
- "dev/.?codecov.ya?ml"
16+
- ".?codecov.ya?ml"
1517
- "**/go.mod"
1618
- "**/go.sum"
1719
- "Taskfile.ya?ml"
@@ -20,7 +22,9 @@ on:
2022
pull_request:
2123
paths:
2224
- ".github/workflows/test-go-task.ya?ml"
23-
- "codecov.ya?ml"
25+
- ".github/.?codecov.ya?ml"
26+
- "dev/.?codecov.ya?ml"
27+
- ".?codecov.ya?ml"
2428
- "**/go.mod"
2529
- "**/go.sum"
2630
- "Taskfile.ya?ml"

0 commit comments

Comments
 (0)