Skip to content

Commit

Permalink
Merge pull request #51 from jflo/gha_testReportPermissions
Browse files Browse the repository at this point in the history
Gha test report permissions
  • Loading branch information
jflo authored Feb 1, 2024
2 parents 38161c9 + 339ca76 commit a976c76
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: acceptance-tests
on:
pull_request:
pull_request_target:
branches:
- main
pull_request_review:
types: [submitted]

Expand All @@ -9,8 +11,17 @@ env:
total-runners: 16

jobs:
authorize:
environment:
${{ github.event_name == 'pull_request_target' &&
github.event.pull_request.head.repo.full_name != github.repository &&
'external' || 'internal' }}
runs-on: ubuntu-latest
steps:
- run: true
shouldRun:
name: checks to ensure we should run
needs: authorize
# necessary because there is no single PR approved event, need to check all comments/approvals/denials
runs-on: ubuntu-22.04
outputs:
Expand Down Expand Up @@ -60,13 +71,15 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/[email protected]
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- name: Set up Java
uses: actions/[email protected]
with:
distribution: temurin
java-version: 17
- name: get acceptance test report
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v3
with:
branch: main
name_is_regexp: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reference-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
name: 'reference-tests'
path: 'ethereum/referencetests/build/generated/sources/reference-test/'
- name: get reference test report
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v3
with:
branch: main
name_is_regexp: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ public ExpectSuccessfulEthGetTransactionReceipt(

@Override
public void verify(final Node node) {
WaitUtils.waitFor(60, () -> assertThat(node.execute(transaction)).isPresent());
WaitUtils.waitFor(60, () -> assertThat(node.execute(transaction)).isNotPresent());
}
}

0 comments on commit a976c76

Please sign in to comment.