From f8d4a960fa3e99d6138ac6539f4fe62670b27ade Mon Sep 17 00:00:00 2001 From: John Ky Date: Tue, 21 Nov 2023 05:57:22 +1100 Subject: [PATCH] Fix stylish-haskell GHA --- ...-haskell.yml => check-stylish-haskell.yml} | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) rename .github/workflows/{stylish-haskell.yml => check-stylish-haskell.yml} (84%) diff --git a/.github/workflows/stylish-haskell.yml b/.github/workflows/check-stylish-haskell.yml similarity index 84% rename from .github/workflows/stylish-haskell.yml rename to .github/workflows/check-stylish-haskell.yml index 594b9f04c17..2343f0b5785 100644 --- a/.github/workflows/stylish-haskell.yml +++ b/.github/workflows/check-stylish-haskell.yml @@ -1,8 +1,8 @@ name: Check Stylish Haskell on: - pull_request: # Required for workflows to be able to be approved from forks merge_group: + pull_request: # When pushing branches (and/or updating PRs), we do want to cancel previous # build runs. We assume they are stale now; and do not want to spend CI time and @@ -19,7 +19,7 @@ concurrency: cancel-in-progress: true jobs: - build: + check-stylish-haskell: runs-on: ubuntu-latest strategy: @@ -27,21 +27,12 @@ jobs: env: # Modify this value to "invalidate" the cabal cache. - CABAL_CACHE_VERSION: "2023-07-28" + CABAL_CACHE_VERSION: "2023-07-12" STYLISH_HASKELL_VERSION: "0.14.4.0" STYLISH_HASKELL_PATHS: > - cardano-testnet - cardano-git-rev - cardano-node - cardano-node-chairman - cardano-tracer - trace-resources - cardano-node-capi - trace-dispatcher - trace-forward - cardano-submit-api + cardano-api steps: - name: Download stylish-haskell @@ -79,7 +70,7 @@ jobs: git add . git stash git fetch origin ${{ github.base_ref }} --unshallow - for x in $(git diff --name-only origin/${{ github.base_ref }}..HEAD ${{ env.STYLISH_HASKELL_PATHS }}); do + for x in $(git diff --name-only --diff-filter=ACMR origin/${{ github.base_ref }}..HEAD ${{ env.STYLISH_HASKELL_PATHS }}); do if [ "${x##*.}" == "hs" ]; then if grep -qE '^#' $x; then echo "$x contains CPP. Skipping."