From b021b923f1444ce4ecd7e54621592f52dce18382 Mon Sep 17 00:00:00 2001 From: Venkateshprasad <32921645+ven-k@users.noreply.github.com> Date: Wed, 27 Sep 2023 16:03:20 +0530 Subject: [PATCH 1/2] ci: skip downstream tests and invalidation tests of PRs when changes are limited to `docs` dir --- .github/workflows/Downstream.yml | 2 ++ .github/workflows/Invalidations.yml | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Downstream.yml b/.github/workflows/Downstream.yml index 519532d82b..63f7a36b52 100644 --- a/.github/workflows/Downstream.yml +++ b/.github/workflows/Downstream.yml @@ -4,6 +4,8 @@ on: branches: [master] tags: [v*] pull_request: + paths-ignore: + - 'docs/**' jobs: test: diff --git a/.github/workflows/Invalidations.yml b/.github/workflows/Invalidations.yml index 28b9ce2fad..d8f9dbe014 100644 --- a/.github/workflows/Invalidations.yml +++ b/.github/workflows/Invalidations.yml @@ -2,6 +2,8 @@ name: Invalidations on: pull_request: + paths-ignore: + - 'docs/**' concurrency: # Skip intermediate builds: always. @@ -30,7 +32,7 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-invalidations@v1 id: invs_default - + - name: Report invalidation counts run: | echo "Invalidations on default branch: ${{ steps.invs_default.outputs.total }} (${{ steps.invs_default.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY From 80f44bca96a18310bce2678c02176e641fe04ad4 Mon Sep 17 00:00:00 2001 From: Venkateshprasad <32921645+ven-k@users.noreply.github.com> Date: Wed, 27 Sep 2023 15:58:58 +0530 Subject: [PATCH 2/2] ci: cancel concurrent jobs for non-master branch - cancels concurrent jobs whenever a PR has subsequent pushes - jobs associated with `master` branch and `tags` are unaffected by this change i.e they run always. --- .github/workflows/Documentation.yml | 6 ++++++ .github/workflows/Downstream.yml | 6 ++++++ .github/workflows/FormatCheck.yml | 6 ++++++ .github/workflows/ci.yml | 7 +++++++ 4 files changed, 25 insertions(+) diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml index 36b3a74cb6..227d7cd343 100644 --- a/.github/workflows/Documentation.yml +++ b/.github/workflows/Documentation.yml @@ -7,6 +7,12 @@ on: tags: '*' pull_request: +concurrency: + # Skip intermediate builds: always, but for the master branch. + # Cancel intermediate builds: always, but for the master branch. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/master' && github.refs != 'refs/tags/*'}} + jobs: build: runs-on: ubuntu-latest diff --git a/.github/workflows/Downstream.yml b/.github/workflows/Downstream.yml index 63f7a36b52..91c6d0848c 100644 --- a/.github/workflows/Downstream.yml +++ b/.github/workflows/Downstream.yml @@ -7,6 +7,12 @@ on: paths-ignore: - 'docs/**' +concurrency: + # Skip intermediate builds: always, but for the master branch and tags. + # Cancel intermediate builds: always, but for the master branch and tags. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/master' && github.refs != 'refs/tags/*' }} + jobs: test: name: ${{ matrix.package.repo }}/${{ matrix.package.group }}/${{ matrix.julia-version }} diff --git a/.github/workflows/FormatCheck.yml b/.github/workflows/FormatCheck.yml index 55af13cc40..04b5f98566 100644 --- a/.github/workflows/FormatCheck.yml +++ b/.github/workflows/FormatCheck.yml @@ -8,6 +8,12 @@ on: tags: '*' pull_request: +concurrency: + # Skip intermediate builds: always, but for the master branch and tags. + # Cancel intermediate builds: always, but for the master branch and tags. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/master' && github.refs != 'refs/tags/*'}} + jobs: build: runs-on: ${{ matrix.os }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 87fcbcd3c5..3f50d1cfba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,13 @@ on: - master paths-ignore: - 'docs/**' + +concurrency: + # Skip intermediate builds: always, but for the master branch. + # Cancel intermediate builds: always, but for the master branch. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} + jobs: test: runs-on: ubuntu-latest