From a4fbd3d2ebf23ce542f315a9bad02135a6b6baf1 Mon Sep 17 00:00:00 2001 From: Francis Chuang Date: Thu, 7 Mar 2024 16:08:03 +1100 Subject: [PATCH] Simplify PR test approval workflow --- .github/workflows/pull-requests.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml index b8615a9..2f7c935 100644 --- a/.github/workflows/pull-requests.yml +++ b/.github/workflows/pull-requests.yml @@ -3,23 +3,29 @@ on: pull_request_target: jobs: - lint: + approve-pr-tests: runs-on: ubuntu-latest environment: - name: "Acceptance Tests" + name: "Pull Request Tests" + steps: + - run: "echo 'Execution of tests pending approval'" + + lint: + needs: ["approve-pr-tests"] + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} - run: npm ci - run: npm run lint + test: + needs: ["approve-pr-tests", "lint"] strategy: matrix: os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} - environment: - name: "Acceptance Tests" steps: - uses: actions/checkout@v4 with: