Skip to content

Commit d57a1e1

Browse files
author
Ciprian Hacman
committed
Skip tests-e2e-scenarios-bare-metal when version.go changes
1 parent bd2a42c commit d57a1e1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/e2e.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,15 @@ jobs:
2929
- name: tests/e2e/scenarios/bare-metal/run-test
3030
working-directory: ${{ env.GOPATH }}/src/k8s.io/kops
3131
run: |
32-
timeout 60m tests/e2e/scenarios/bare-metal/run-test
32+
CHANGED_VERSION=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -E '^version\.go$')
33+
if [ -z "${CHANGED_VERSION}" ]; then
34+
timeout 60m tests/e2e/scenarios/bare-metal/run-test
35+
else
36+
echo "version.go has been modified, skipping test"
37+
fi
3338
env:
3439
ARTIFACTS: /tmp/artifacts
40+
3541
- name: Archive production artifacts
3642
if: always()
3743
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)