From 17c3e9e98f47ef859502ba3e38be0b8a6a4bddd9 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Wed, 31 May 2023 15:26:08 -0600 Subject: [PATCH] chore: update test to include pull request head sha checkout (#1205) --- .github/workflows/test.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e18f47eb..6f9f5510 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -316,6 +316,33 @@ jobs: shell: bash + test-pull-request-head-ref: + name: Test changed-files with pull request head ref + runs-on: ubuntu-latest + needs: build + if: github.event_name != 'push' + + steps: + - name: Checkout to branch + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Download build assets + uses: actions/download-artifact@v3 + with: + name: build-assets + + - name: Run changed-files + id: changed-files + uses: ./ + + - name: Show output + run: | + echo '${{ toJSON(steps.changed-files.outputs) }}' + shell: + bash + test-non-existent-base-sha: name: Test changed-files non existent base sha runs-on: ubuntu-latest