Skip to content

Commit

Permalink
chore: do not run functional tests on pull-requests forks
Browse files Browse the repository at this point in the history
These tests fail because they need the GITGUARDIAN_API_KEY variable, but
it's not available for pull-requests coming from forks.

Fixes GitGuardian#374
  • Loading branch information
agateau-gg committed Feb 22, 2023
1 parent f78e1b9 commit 5681291
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ jobs:
fail_ci_if_error: false

- name: Run functional tests
# For security reasons, secrets are not available when running tests for a pull request from a fork. This causes
# all functional tests to fail because GITGUARDIAN_API_KEY is not defined. To avoid this, skip this step if we
# were triggered by a pull request from a fork.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
shell: bash
run: |
make functest GITGUARDIAN_API_KEY=${{ secrets.GITGUARDIAN_API_KEY }} GITGUARDIAN_API_URL=${{ secrets.GITGUARDIAN_API_URL }}
Expand Down

0 comments on commit 5681291

Please sign in to comment.