From 286636dfa4b56b0de862b6ae4013823b8508f7b6 Mon Sep 17 00:00:00 2001 From: Philipp Horstenkamp Date: Sat, 23 Sep 2023 09:22:14 +0200 Subject: [PATCH] Reduced the execution of tests and lint actions on pull requests (#143) This change will change the pipline to limit duplicat execution of tests and lint actions in pull requests to save computing time. --- .github/workflows/documentation.yaml | 1 + .github/workflows/lint-actions.yaml | 1 + .github/workflows/test-and-build-action.yaml | 3 +++ .gitignore | 1 + 4 files changed, 6 insertions(+) diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml index eb7652b..3fcb11b 100644 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -5,6 +5,7 @@ on: branches: - main pull_request: + types: [opened, reopened, synchronize] jobs: doc-build: diff --git a/.github/workflows/lint-actions.yaml b/.github/workflows/lint-actions.yaml index 81cf648..4563a11 100644 --- a/.github/workflows/lint-actions.yaml +++ b/.github/workflows/lint-actions.yaml @@ -3,6 +3,7 @@ name: Python-Lint on: push: pull_request: + types: [reopened, opened] jobs: Black: diff --git a/.github/workflows/test-and-build-action.yaml b/.github/workflows/test-and-build-action.yaml index 9653c3b..b69a149 100644 --- a/.github/workflows/test-and-build-action.yaml +++ b/.github/workflows/test-and-build-action.yaml @@ -2,6 +2,7 @@ name: Test & Build on: pull_request: + types: [reopened, opened, synchronize] push: jobs: @@ -63,6 +64,7 @@ jobs: thresholdModified: 0.7 coverage_report: + if: ${{ github.event_name == 'push' }} runs-on: ubuntu-latest needs: test steps: @@ -99,6 +101,7 @@ jobs: build: runs-on: ubuntu-latest needs: test + if: ${{ github.event_name == 'push' }} steps: - name: Setup Python uses: actions/setup-python@v4 diff --git a/.gitignore b/.gitignore index d5f8fdc..f536711 100644 --- a/.gitignore +++ b/.gitignore @@ -221,3 +221,4 @@ replay_pid* /lbr-audit.md /.ruff_cache/ /Jupyter/test.ipynb +/secrets*.json