Skip to content

Commit

Permalink
Merge pull request #741 from IntersectMBO/smelc/improvements-to-ci-an…
Browse files Browse the repository at this point in the history
…d-nix

Make all pipelines pass actionlint and remove useless bits in flake.nix
  • Loading branch information
smelc committed Apr 25, 2024
2 parents 810d44c + 76e4b16 commit 61647dd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
1 change: 0 additions & 1 deletion .github/workflows/actionlint-exceptions.txt
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
.github/workflows/check-stylish-haskell.yml
12 changes: 6 additions & 6 deletions .github/workflows/check-stylish-haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Check Stylish Haskell
on:
merge_group:
pull_request:
workflow_dispatch:

# 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
Expand Down Expand Up @@ -36,15 +37,14 @@ jobs:
steps:
- name: Download stylish-haskell
if: runner.os == 'Linux'
run: |
version="${{ env.STYLISH_HASKELL_VERSION }}"
curl -sL \
"https://github.com/haskell/stylish-haskell/releases/download/v$version/stylish-haskell-v$version-linux-x86_64.tar.gz" \
| tar -C "/tmp" -xz
echo "PATH=/tmp/stylish-haskell-v$version-linux-x86_64:$PATH" >> $GITHUB_ENV
echo "PATH=/tmp/stylish-haskell-v$version-linux-x86_64:$PATH" >> "$GITHUB_ENV"
- uses: actions/checkout@v3

Expand All @@ -55,10 +55,10 @@ jobs:
for x in $(git ls-tree --full-tree --name-only -r HEAD ${{ env.STYLISH_HASKELL_PATHS }}); do
if [ "${x##*.}" == "hs" ]; then
if grep -qE '^#' $x; then
if grep -qE '^#' "$x"; then
echo "$x contains CPP. Skipping."
else
stylish-haskell -i $x
stylish-haskell -i "$x"
fi
fi
done
Expand All @@ -72,10 +72,10 @@ jobs:
git fetch origin ${{ github.base_ref }} --unshallow
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
if grep -qE '^#' "$x"; then
echo "$x contains CPP. Skipping."
else
stylish-haskell -i $x
stylish-haskell -i "$x"
fi
fi
done
Expand Down
4 changes: 0 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@
modules = [
({pkgs, ...}: {
packages.cardano-cli.configureFlags = [ "--ghc-option=-Werror" ] ++ gitRevFlag;
packages.cardano-cli.components.tests.cardano-cli-test.build-tools =
with pkgs.buildPackages; [ jq coreutils ];
packages.cardano-cli.components.tests.cardano-cli-golden.build-tools =
with pkgs.buildPackages; [ jq coreutils ];
})
({
pkgs,
Expand Down

0 comments on commit 61647dd

Please sign in to comment.