From c5f5d20fa8635acf40e17f609af2a30c362c933c Mon Sep 17 00:00:00 2001 From: Javier Neira Date: Sat, 27 Mar 2021 16:22:12 +0100 Subject: [PATCH] Remove ignored paths (#1623) * Remove ignored paths * Remove old needs * Add bench-init to needs Co-authored-by: Potato Hatsue <1793913507@qq.com> --- .github/workflows/bench.yml | 25 +++++++++++++++---------- .github/workflows/nix.yml | 19 +++++++++++++------ .github/workflows/test.yml | 21 ++++++++++++++------- 3 files changed, 42 insertions(+), 23 deletions(-) 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