Skip to content

Commit

Permalink
Limit integration tests to ones that work with the GITHUB_TOKEN. (#2672)
Browse files Browse the repository at this point in the history
Signed-off-by: Spencer Schrock <sschrock@google.com>
  • Loading branch information
spencerschrock authored Feb 15, 2023
1 parent 7876a13 commit c9f582b
Showing 1 changed file with 1 addition and 31 deletions.
32 changes: 1 addition & 31 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@

# Run secret-dependent integration tests only after approval
name: Integration tests
on: pull_request_target
on: pull_request

permissions:
contents: read
pull-requests: write

jobs:
approve:
Expand Down Expand Up @@ -61,43 +60,14 @@ jobs:
uses: nick-invision/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd
env:
GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLAB_AUTH_TOKEN: ${{ secrets.GITLAB_TOKEN }}
with:
max_attempts: 3
retry_on: error
timeout_minutes: 30
command: make e2e-gh-token

- name: Run PAT E2E #using retry because the GitHub token is being throttled.
uses: nick-invision/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd
env:
GITHUB_AUTH_TOKEN: ${{ secrets.GH_AUTH_TOKEN }}
with:
max_attempts: 3
retry_on: error
timeout_minutes: 30
command: make e2e-pat

- name: codecov
uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # 2.1.0
with:
files: ./e2e-coverage.out
verbose: true

- name: find comment
uses: peter-evans/find-comment@85a676a52594b4481e0532825a2d8906ef96dac2 # v2.2.1
id: fc
with:
issue-number: ${{ github.event.pull_request.number || github.event.client_payload.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: Integration tests ran for

- name: create or update comment
uses: peter-evans/create-or-update-comment@5adcb0bb0f9fb3f95ef05400558bdb3f329ee808 # v1.4.5
with:
issue-number: ${{ github.event.pull_request.number || github.event.client_payload.pull_request.number }}
comment-id: ${{ steps.fc.outputs.comment-id }}
body: |
Integration tests ${{ job.status }} for
[${{ github.event.client_payload.slash_command.args.named.sha || github.event.pull_request.head.sha }}]
(https://github.com/ossf/scorecard/actions/runs/${{ github.run_id }})

0 comments on commit c9f582b

Please sign in to comment.