From 754ac46850bd80e56e983a0700c455c9a632da1a Mon Sep 17 00:00:00 2001 From: Justin Florentine Date: Tue, 5 Mar 2024 08:37:54 -0500 Subject: [PATCH] fixes job dependencies Signed-off-by: Justin Florentine --- .github/workflows/acceptance-tests.yml | 1 - .github/workflows/integration-tests.yml | 1 - .github/workflows/reference-tests.yml | 45 ------------------------- 3 files changed, 47 deletions(-) diff --git a/.github/workflows/acceptance-tests.yml b/.github/workflows/acceptance-tests.yml index bc09913ecc6..de7970c429a 100644 --- a/.github/workflows/acceptance-tests.yml +++ b/.github/workflows/acceptance-tests.yml @@ -14,7 +14,6 @@ jobs: acceptanceTestEthereum: runs-on: ubuntu-22.04 name: "Acceptance Runner" - needs: shouldRun permissions: statuses: write checks: write diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index a3b2ceb73e1..f262d986b1c 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -16,7 +16,6 @@ jobs: integration-tests: name: "integration-passed" runs-on: ubuntu-22.04 - needs: shouldRun permissions: statuses: write checks: write diff --git a/.github/workflows/reference-tests.yml b/.github/workflows/reference-tests.yml index 26b29be1064..c8f320bb0c9 100644 --- a/.github/workflows/reference-tests.yml +++ b/.github/workflows/reference-tests.yml @@ -5,63 +5,18 @@ on: branches: - main - release-* - pull_request_review: - types: [ submitted ] env: GRADLE_OPTS: "-Xmx6g -Dorg.gradle.daemon=false" total-runners: 10 jobs: - shouldRun: - name: checks to ensure we should run - # necessary because there is no single PR approved event, need to check all comments/approvals/denials - # might also be a job running, and additional approvals - runs-on: ubuntu-22.04 - outputs: - shouldRun: ${{steps.shouldRun.outputs.result}} - steps: - - name: required check - id: shouldRun - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea - env: - # fun fact, this changes based on incoming event, it will be different when we run this on pushes to main - RELEVANT_SHA: ${{ github.event.pull_request.head.sha || github.sha }} - with: - script: | - const { RELEVANT_SHA } = process.env; - const { data: { statuses } } = await github.rest.repos.getCombinedStatusForRef({ - owner: context.repo.owner, - repo: context.repo.repo, - ref: RELEVANT_SHA, - }); - - - const refTested = statuses && statuses.filter(({ context }) => context === 'reftests-passed'); - const alreadyRun = refTested && refTested.find(({ state }) => state === 'success') > 0; - const { data: reviews } = await github.rest.pulls.listReviews({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.issue.number, - }); - const approvingReviews = reviews && reviews.filter(review => review.state === 'APPROVED'); - const shouldRun = !alreadyRun && github.actor != 'dependabot[bot]' && (approvingReviews.length > 0); - - console.log("tests should be run = %j", shouldRun); - console.log("alreadyRun = %j", alreadyRun); - console.log("approvingReviews = %j", approvingReviews.length); - - return shouldRun; - referenceTestEthereum: runs-on: ubuntu-22.04 permissions: statuses: write checks: write packages: read - needs: - - shouldRun - if: ${{ needs.shouldRun.outputs.shouldRun == 'true' }} strategy: fail-fast: true matrix: