From 1601bff1a500d4860eeb1a13864ae34ed765e4e9 Mon Sep 17 00:00:00 2001 From: Joe Date: Tue, 26 Sep 2023 14:08:13 -0700 Subject: [PATCH] updates GHA so integration tests will not run on fork prs, they will fail since they need the github secrets --- .github/workflows/unit-tests.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index 33c3676..7f386f1 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -4,6 +4,9 @@ on: pull_request: branches: - main + push: + branches: + - main jobs: test: @@ -27,4 +30,11 @@ jobs: run: npm install - name: Run tests - run: npm run test + run: | + if [ "${{ github.event.pull_request.head.repo.fork }}" == "true" ]; then + echo "PR is from a fork, running unit tests..." + npm run test-unit + else + echo "PR is not from a fork, running all tests..." + npm run test + fi