From 4d0945151945443b76675f4365221703e0a3bb7a Mon Sep 17 00:00:00 2001 From: Eno Compton Date: Wed, 14 Aug 2024 11:24:17 -0600 Subject: [PATCH] chore: skip integration tests on forks GitHub provides no reasonable and secure way to run integration tests against PRs from forks. This PR adjusts the CI builds to skip integration tests on PRs from forks and otherwise runs the entire test suite for internal PRs. In addition, integration tests will run on main regardless to catch any regressions. --- .github/workflows/tests.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 037f8a23..43dd03cc 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -45,6 +45,11 @@ jobs: CGO_ENABLED=0 GOOS=openbsd go build integration: runs-on: [self-hosted, linux, x64] + # run integration tests on all builds except pull requests from forks or + # dependabot + if: | + github.event_name != 'pull_request' || + (github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]') name: "integration tests (linux)" permissions: contents: 'read'