From 425dd257109b9db281893b7f0e02e5ea3f04040d Mon Sep 17 00:00:00 2001 From: Justin Florentine Date: Thu, 1 Feb 2024 11:18:17 -0500 Subject: [PATCH] no need for shouldRun job anymore Signed-off-by: Justin Florentine --- .github/workflows/acceptance-tests.yml | 42 ++------------------------ 1 file changed, 2 insertions(+), 40 deletions(-) diff --git a/.github/workflows/acceptance-tests.yml b/.github/workflows/acceptance-tests.yml index 80dd2415b9e..03b2c9194f2 100644 --- a/.github/workflows/acceptance-tests.yml +++ b/.github/workflows/acceptance-tests.yml @@ -3,8 +3,6 @@ on: pull_request_target: branches: - main - pull_request_review: - types: [submitted] env: GRADLE_OPTS: "-Xmx6g -Dorg.gradle.daemon=false" @@ -19,47 +17,11 @@ jobs: 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: - shouldRun: ${{steps.shouldRun.outputs.result}} - steps: - - name: required check - id: shouldRun - uses: actions/github-script@v7.0.1 - 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 acceptanceTested = statuses && statuses.filter(({ context }) => context === 'acceptance-tests'); - const alreadyRun = acceptanceTested && acceptanceTested.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; + acceptanceTestEthereum: runs-on: ubuntu-22.04 name: "Acceptance Runner" - needs: shouldRun + needs: authorize permissions: statuses: write checks: write