From cd60317ca39614c444bbc3e4eff5418ad4bdde49 Mon Sep 17 00:00:00 2001 From: Eno Compton Date: Wed, 14 Aug 2024 11:29:37 -0600 Subject: [PATCH] chore: skip integration tests on forks (#692) 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'