Skip to content

Commit c6866cd

Browse files
ci: split tests into separate workflow to avoid running on irrelevant changes
Moved the `prepare_test_image_testdata`, `tests`, and `docker` jobs from `checks.yml` into a new `tests.yml` workflow file. Configured `paths-ignore` for the `tests.yml` workflow so that these long-running tests are skipped if changes only affect markdown files, documentation, scripts, or other unrelated GitHub Actions workflows. This prevents unnecessary test runs while still executing quick lint and formatting checks in `checks.yml`. Additionally, fixed zizmor alerts for cache poisoning and credential persistence in the docker job, and formatted the new file with prettier. Co-authored-by: another-rex <106129829+another-rex@users.noreply.github.com>
1 parent 0c8192c commit c6866cd

1 file changed

Lines changed: 14 additions & 12 deletions

File tree

.github/workflows/tests.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@ on:
1818
push:
1919
branches: ["main", "v1", "mcp"]
2020
paths-ignore:
21-
- '**/*.md'
22-
- 'docs/**'
23-
- '.github/workflows/*'
24-
- '!.github/workflows/tests.yml'
25-
- '!.github/workflows/test-action/**'
26-
- 'scripts/**'
21+
- "**/*.md"
22+
- "docs/**"
23+
- ".github/workflows/*"
24+
- "!.github/workflows/tests.yml"
25+
- "!.github/workflows/test-action/**"
26+
- "scripts/**"
2727
pull_request:
2828
# The branches below must be a subset of the branches above
2929
branches: ["main", "v1", "mcp"]
3030
paths-ignore:
31-
- '**/*.md'
32-
- 'docs/**'
33-
- '.github/workflows/*'
34-
- '!.github/workflows/tests.yml'
35-
- '!.github/workflows/test-action/**'
36-
- 'scripts/**'
31+
- "**/*.md"
32+
- "docs/**"
33+
- ".github/workflows/*"
34+
- "!.github/workflows/tests.yml"
35+
- "!.github/workflows/test-action/**"
36+
- "scripts/**"
3737
workflow_dispatch:
3838

3939
concurrency:
@@ -102,11 +102,13 @@ jobs:
102102
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
103103
with:
104104
fetch-depth: 0
105+
persist-credentials: false
105106
- name: Set up Go
106107
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
107108
with:
108109
go-version-file: "go.mod"
109110
check-latest: true
111+
cache: false
110112
- uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
111113
- uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
112114
- name: Run GoReleaser

0 commit comments

Comments
 (0)