From 92f054f5d6ad5668a86e96183009f3ffd1581785 Mon Sep 17 00:00:00 2001 From: Georgy Lukyanov Date: Wed, 18 Dec 2024 10:57:27 +0100 Subject: [PATCH] Use a script to check cabal files in GH actions --- .github/workflows/checks.yml | 10 +--------- scripts/ci/check-cabal-files.sh | 2 ++ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 0e09bcfab2..c06113ce60 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -56,15 +56,7 @@ jobs: - uses: actions/checkout@v4 - name: Cabal check - run: | - for x in $(find . -name '*.cabal' | grep -vE 'dist-newstyle|asserts\.cabal' | cut -c 3-); do - ( - d=$(dirname $x) - echo "== $d ==" - cd $d - cabal check - ) - done + run: ./scripts/ci/check-cabal-files.sh check-release-badges: diff --git a/scripts/ci/check-cabal-files.sh b/scripts/ci/check-cabal-files.sh index 7ef07a2b52..1abd13e09c 100755 --- a/scripts/ci/check-cabal-files.sh +++ b/scripts/ci/check-cabal-files.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +set -Eeuo pipefail + for x in $(find . -name '*.cabal' | grep -vE 'dist-newstyle|asserts\.cabal' | cut -c 3-); do ( d=$(dirname $x)