diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b7ef92d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,52 @@ +name: Haskell CI + +on: [pull_request] + +jobs: + build: + name: ghc ${{ matrix.ghc }} + runs-on: ubuntu-16.04 + strategy: + matrix: + ghc: ["8.2.2", "8.4.4", "8.6.5", "8.8.3", "8.10.1"] + cabal: ["latest"] + + steps: + - uses: actions/checkout@v2 + if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master' + + - uses: actions/setup-haskell@v1.1.2 + name: Setup Haskell + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} + + - uses: actions/cache@v1 + name: Cache ~/.cabal/packages + with: + path: ~/.cabal/packages + key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-packages + - uses: actions/cache@v1 + name: Cache ~/.cabal/store + with: + path: ~/.cabal/store + key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-store + - uses: actions/cache@v1 + name: Cache dist-newstyle + with: + path: dist-newstyle + key: ${{ runner.os }}-${{ matrix.ghc }}-fused-effects-exceptions-dist + + - name: Install dependencies + run: | + cabal v2-update + cabal v2-configure --project-file=cabal.project.ci --enable-tests --write-ghc-environment-files=always -j2 + cabal v2-build --project-file=cabal.project.ci --only-dependencies all + + - name: Build & test + run: | + cabal v2-build --project-file=cabal.project.ci + cabal v2-run --project-file=cabal.project.ci test + cabal v2-haddock --project-file=cabal.project.ci + cabal v2-sdist --project-file=cabal.project.ci + cabal check diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml deleted file mode 100644 index e61f342..0000000 --- a/.github/workflows/haskell.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Haskell CI - -on: [pull_request] - -jobs: - build: - name: ghc ${{ matrix.ghc }} - runs-on: ubuntu-16.04 - strategy: - matrix: - ghc: ["8.2.2", "8.4.4", "8.6.5", "8.8.1"] - cabal: ["3.0"] - - steps: - - uses: actions/checkout@master - if: github.event.action == 'opened' || github.event.action == 'synchronize' - - - uses: actions/setup-haskell@v1 - name: Setup Haskell - with: - ghc-version: ${{ matrix.ghc }} - cabal-version: ${{ matrix.cabal }} - - - name: Install dependencies - run: | - cabal v2-update - cabal v2-configure --enable-tests --write-ghc-environment-files=always -j2 - cabal v2-build --only-dependencies - - - name: Build & test - run: | - cabal v2-build - cabal v2-test - cabal v2-haddock - cabal v2-sdist - cabal check diff --git a/ChangeLog.md b/ChangeLog.md index 0344e38..1daaeee 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,8 @@ +# 1.1.0.0 + +* Port to fused-effects 1.1. + + # 1.0.0.0 * Port to fused-effects 1.0. diff --git a/cabal.project.ci b/cabal.project.ci new file mode 100644 index 0000000..f022fab --- /dev/null +++ b/cabal.project.ci @@ -0,0 +1,4 @@ +packages: . + +package fused-effects-exceptions + ghc-options: -Werror diff --git a/fused-effects-exceptions.cabal b/fused-effects-exceptions.cabal index 2f922c2..8557930 100644 --- a/fused-effects-exceptions.cabal +++ b/fused-effects-exceptions.cabal @@ -1,7 +1,7 @@ cabal-version: 2.4 name: fused-effects-exceptions -version: 1.0.0.0 +version: 1.1.0.0 synopsis: Handle exceptions thrown in IO with fused-effects. description: Provides Resource and Catch effects capable of reacting to and catching GHC's dynamic exceptions. homepage: https://github.com/fused-effects/fused-effects-exceptions#readme @@ -20,7 +20,8 @@ tested-with: GHC == 8.2.2 GHC == 8.4.4 GHC == 8.6.5 - GHC == 8.8.1 + GHC == 8.8.3 + GHC == 8.10.1 common common default-language: Haskell2010 diff --git a/test/Main.hs b/test/Main.hs index 536e95d..3b957cb 100644 --- a/test/Main.hs +++ b/test/Main.hs @@ -19,12 +19,12 @@ problematic = testStateDropsWrites :: Tasty.TestTree testStateDropsWrites = HUnit.testCase "State.Strict drops writes" $ do - result <- State.execState 'a' $ problematic + result <- State.execState 'a' problematic result HUnit.@?= 'a' -- writes are lost testIOStatePreservesWrites :: Tasty.TestTree testIOStatePreservesWrites = HUnit.testCase "State.IORef preserves writes" $ do - result <- IOState.execState 'a' $ problematic + result <- IOState.execState 'a' problematic result HUnit.@?= 'x' tests :: Tasty.TestTree @@ -37,4 +37,3 @@ tests = Tasty.testGroup "Control.Carrier.Exception" main :: IO () main = Tasty.defaultMain tests -