From 54a3149fe10959fe9d83d245712dd059fb17479f Mon Sep 17 00:00:00 2001 From: Elliot Winkler Date: Thu, 14 Mar 2024 09:25:23 -0600 Subject: [PATCH] Run linting and testing GitHub workflows on PRs Currently, code is not automatically linted and tests are not automatically run on pull requests. This happens because the workflows which would perform these steps are not configured to run on pull requests but only on a push to `main`. This PR modifies the workflows to run on the `pull_request` event. --- .github/workflows/shellcheck.yml | 5 ++++- .github/workflows/test-monorepo.yml | 5 ++++- .github/workflows/test-polyrepo.yml | 5 ++++- .github/workflows/test.yml | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index 51c1a14..4af204f 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -3,7 +3,10 @@ name: shellcheck permissions: checks: write -on: [push] +on: + push: + branches: [main] + pull_request: jobs: lint: diff --git a/.github/workflows/test-monorepo.yml b/.github/workflows/test-monorepo.yml index 548b778..6e5884d 100644 --- a/.github/workflows/test-monorepo.yml +++ b/.github/workflows/test-monorepo.yml @@ -1,5 +1,8 @@ name: test-monorepo -on: [push] +on: + push: + branches: [main] + pull_request: jobs: # test npm publish dry-run checkout_publish_skunkworks_dry_run: diff --git a/.github/workflows/test-polyrepo.yml b/.github/workflows/test-polyrepo.yml index 074981b..b916917 100644 --- a/.github/workflows/test-polyrepo.yml +++ b/.github/workflows/test-polyrepo.yml @@ -1,5 +1,8 @@ name: test-polyrepo -on: [push] +on: + push: + branches: [main] + pull_request: jobs: # test npm publish dry-run checkout_publish_controllers_dry_run: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 11c4db4..3e6b187 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,8 @@ name: test -on: [push] +on: + push: + branches: [main] + pull_request: jobs: test: runs-on: ubuntu-20.04