Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make CI pass #1

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ jobs:
git diff --exit-code

# Check formatting for cabal files
cabal-fmt:
cabal-gild:
runs-on: ${{ matrix.os }}

strategy:
Expand Down Expand Up @@ -199,22 +199,22 @@ jobs:
- name: Cache cabal store
uses: actions/cache@v4
env:
cache-name: cache-cabal-cabal-fmt
cache-name: cache-cabal-cabal-gild
with:
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ env.cache-name }}-${{ env.hackage-index-state }}
restore-keys: |
${{ runner.os }}-${{ matrix.ghc }}-${{ env.cache-name }}-

- name: Install cabal-fmt
run: cabal install --ignore-project --index-state="${{ env.hackage-index-state }}" cabal-fmt-0.1.12
- name: Install cabal-gild
run: cabal install --ignore-project --index-state="${{ env.hackage-index-state }}" cabal-gild-1.5.0.1

- name: Record cabal-fmt version
- name: Record cabal-gild version
run: |
which cabal-fmt
cabal-fmt --version
which cabal-gild
cabal-gild --version

- name: Run cabal-fmt
- name: Run cabal-gild
run: |
./scripts/format-cabal.sh
git diff --exit-code
Expand Down
9 changes: 4 additions & 5 deletions rawlock/test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ module Main (main) where

import Control.Concurrent.Class.MonadSTM.Strict
import Control.Exception (throw)
import Control.Monad (void)
import Control.Monad.Class.MonadAsync
import Control.Monad.Class.MonadFork
import Control.Monad.Class.MonadSay
Expand Down Expand Up @@ -308,7 +307,7 @@ prop_unsafe_actions actions@(a1, a2, a3) = counterexample (show actions) $
(atomically (unsafeAcquireReadAccess l))
(const $ atomically (unsafeReleaseReadAccess l))
(say . ("Read: " <>) . show)
Incr -> void $ generalBracket
Incr -> generalBracket
(unsafeAcquireWriteAccess l)
(\orig -> \case
ExitCaseSuccess s' -> unsafeReleaseWriteAccess l s'
Expand All @@ -317,8 +316,8 @@ prop_unsafe_actions actions@(a1, a2, a3) = counterexample (show actions) $
(\s -> do
say ("Incr: " <> show s)
pure (s + 1)
)
Append -> void $ generalBracket
) >> pure ()
Append -> generalBracket
(unsafeAcquireAppendAccess l)
(\orig -> \case
ExitCaseSuccess s' -> unsafeReleaseAppendAccess l s'
Expand All @@ -327,7 +326,7 @@ prop_unsafe_actions actions@(a1, a2, a3) = counterexample (show actions) $
(\s -> do
say ("Append: " <> show s)
pure (s + 1)
)
) >> pure ()
t1 <- async $ c a1
t2 <- async $ c a2
t3 <- async $ c a3
Expand Down
2 changes: 2 additions & 0 deletions resource-registry/test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ import Control.Monad.Class.MonadFork
import Control.Monad.Class.MonadThrow
import Control.Monad.Class.MonadTimer.SI
import Control.Monad.Except
#if __GLASGOW_HASKELL__ > 904
import Control.Monad.IO.Class
#endif
import Control.ResourceRegistry
import Data.Foldable
import Data.Function
Expand Down
Empty file modified scripts/check-cabal.sh
100644 → 100755
Empty file.
Empty file modified scripts/format-cabal.sh
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion scripts/format-stylish.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ if ! command -v "$fdcmd" &> /dev/null; then
fi
fi

$fdcmd $PARGS -e hs -E test/Main.hs -X stylish-haskell $CARGS -i
$fdcmd $PARGS -e hs -E resource-registry/test/Main.hs -X stylish-haskell $CARGS -i

case "$(uname -s)" in
MINGW*) git ls-files --eol | grep "w/crlf" | awk '{print $4}' | xargs dos2unix;;
Expand Down