From 0055c5cbd9ab4932f2ae3fff96e3e5f71613318c Mon Sep 17 00:00:00 2001 From: RDW Date: Wed, 17 Nov 2021 12:16:19 +0100 Subject: [PATCH] CI: Eliminate duplicate workflow runs from Pull Requests The previous configuration would trigger two runs when changes were made to PRs. That's hugely wasteful, increases the time-to-feedback, and simply not useful in the slightest. --- .github/workflows/build-and-release.yml | 11 ++++++----- .github/workflows/check-format-via-prettier.yml | 8 ++++++++ .github/workflows/detect-temporary-comments.yml | 8 ++++++++ .github/workflows/run-automated-tests.yml | 8 ++++++++ .github/workflows/static-analysis-via-eslint.yml | 8 ++++++++ 5 files changed, 38 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 102e9c2..b020988 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -2,14 +2,15 @@ name: Build and Release on: - push: - branches: - - main pull_request: + paths-ignore: + - "README.md" + types: [opened, synchronize, reopened, ready_for_review] + push: branches: - main - create: - # Any branch or tag + paths-ignore: + - "README.md" jobs: build: diff --git a/.github/workflows/check-format-via-prettier.yml b/.github/workflows/check-format-via-prettier.yml index 4bef6f4..6c20676 100644 --- a/.github/workflows/check-format-via-prettier.yml +++ b/.github/workflows/check-format-via-prettier.yml @@ -1,7 +1,15 @@ name: Formatting on: + pull_request: + paths-ignore: + - "README.md" + types: [opened, synchronize, reopened, ready_for_review] push: + branches: + - main + paths-ignore: + - "README.md" jobs: lint: diff --git a/.github/workflows/detect-temporary-comments.yml b/.github/workflows/detect-temporary-comments.yml index c7cce31..d33d43d 100644 --- a/.github/workflows/detect-temporary-comments.yml +++ b/.github/workflows/detect-temporary-comments.yml @@ -1,7 +1,15 @@ name: No TODOs on: + pull_request: + paths-ignore: + - "README.md" + types: [opened, synchronize, reopened, ready_for_review] push: + branches: + - main + paths-ignore: + - "README.md" jobs: lint: diff --git a/.github/workflows/run-automated-tests.yml b/.github/workflows/run-automated-tests.yml index 714faa0..4db21d1 100644 --- a/.github/workflows/run-automated-tests.yml +++ b/.github/workflows/run-automated-tests.yml @@ -1,7 +1,15 @@ name: Automated Testing on: + pull_request: + paths-ignore: + - "README.md" + types: [opened, synchronize, reopened, ready_for_review] push: + branches: + - main + paths-ignore: + - "README.md" jobs: test: diff --git a/.github/workflows/static-analysis-via-eslint.yml b/.github/workflows/static-analysis-via-eslint.yml index f82148f..2e6ef96 100644 --- a/.github/workflows/static-analysis-via-eslint.yml +++ b/.github/workflows/static-analysis-via-eslint.yml @@ -1,7 +1,15 @@ name: Static Analysis on: + pull_request: + paths-ignore: + - "README.md" + types: [opened, synchronize, reopened, ready_for_review] push: + branches: + - main + paths-ignore: + - "README.md" jobs: lint: