Skip to content

Commit

Permalink
chore: skip integration tests on forks (#692)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
enocom committed Aug 14, 2024
1 parent f696cba commit cd60317
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit cd60317

Please sign in to comment.