diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 05f3eb8c2d..3eb9c7afa8 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -4,18 +4,22 @@ on: pull_request: branches: - '**' - paths-ignore: - - '**/docs/**' - - '**.md' - - '**/LICENSE' - - '.circleci/**' - - 'install/**' - - 'nix/**' - - 'test/**' - - 'ghcide/test/**' jobs: + pre_job: + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + with: + cancel_others: true + paths_ignore: '["**/docs/**", "**.md", "**/LICENSE", ".circleci/**", "install/**", "nix/**", "**/test/**"]' + bench-init: + needs: pre_job + if: ${{ needs.pre_job.outputs.should_skip != 'true' }} runs-on: ${{ matrix.os }} strategy: @@ -86,7 +90,8 @@ jobs: path: ~/.cabal/cabal.tar.gz bench-example: - needs: [bench-init] + needs: [pre_job, bench-init] + if: ${{ needs.pre_job.outputs.should_skip != 'true' }} runs-on: ${{ matrix.os }} strategy: diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 11a35a804c..0b591ab858 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -4,15 +4,22 @@ on: pull_request: branches: - '**' - paths-ignore: - - '**/docs/**' - - '**.md' - - '**/LICENSE' - - '.circleci/**' - - 'install/**' jobs: + pre_job: + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + with: + cancel_others: true + paths_ignore: '["**/docs/**", "**.md", "**/LICENSE", ".circleci/**", "install/**"]' + nix: + needs: pre_job + if: ${{ needs.pre_job.outputs.should_skip != 'true' }} runs-on: ${{ matrix.os }} strategy: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 51c31323ee..d2a563c5af 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,16 +8,23 @@ on: pull_request: branches: - '**' - paths-ignore: - - '**/docs/**' - - '**.md' - - '**/LICENSE' - - '.circleci/**' - - 'install/**' - - 'nix/**' jobs: + pre_job: + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + with: + cancel_others: true + paths_ignore: '["**/docs/**", "**.md", "**/LICENSE", ".circleci/**", "install/**", "nix/**"]' + + test: + needs: pre_job + if: ${{ needs.pre_job.outputs.should_skip != 'true' }} runs-on: ${{ matrix.os }} strategy: fail-fast: true