Skip to content

Commit

Permalink
Redo CI
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrisbin committed Mar 31, 2022
1 parent 607a4d7 commit 8ea5808
Show file tree
Hide file tree
Showing 17 changed files with 174 additions and 58 deletions.
33 changes: 28 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,48 @@ on:
jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
stack-yaml:
- stack-nightly.yaml # ghc-9.2
- stack.yaml # ghc-9.0
- stack-lts-18.28.yaml # ghc-8.10
- stack-lts-16.31.yaml # ghc-8.8
- stack-lts-14.27.yaml # ghc-8.6
- stack-lts-12.26.yaml # ghc-8.4
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: freckle/stack-cache-action@v1
with:
stack-yaml: ${{ matrix.stack-yaml }}

- id: stack
uses: freckle/stack-action@v3
with:
stack-arguments: --flag yesod-paginator:examples --coverage
stack-yaml: ${{ matrix.stack-yaml }}
stack-arguments: --coverage

- name: Reformat coverage
- if: ${{ matrix.stack-yaml == 'stack.yaml' }}
name: Reformat coverage
run: |
tix='${{ steps.stack.outputs.local-hpc-root }}/combined/all/all.tix'
stack --no-terminal install --copy-compiler-tool hpc-lcov
stack --no-terminal exec -- hpc-lcov --file "$tix"
stack --resolver lts-18.28 --no-terminal install --copy-compiler-tool hpc-lcov
stack --resolver lts-18.28 --no-terminal exec -- hpc-lcov --file "$tix"
- uses: codecov/codecov-action@v2
- if: ${{ matrix.stack-yaml == 'stack.yaml' }}
name: Upload coverage
uses: codecov/codecov-action@v2
with:
files: ./lcov.info

- if: ${{ matrix.stack-yaml == 'stack.yaml' }}
uses: freckle/weeder-action@v1
with:
weeder-version: 2.2.0

hlint:
runs-on: ubuntu-latest
steps:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ jobs:
- uses: actions/checkout@v2

- id: tag
uses: freckle/haskell-tag-action@main
uses: freckle/haskell-tag-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- if: steps.tag.outputs.tag
uses: freckle/stack-upload-action@main
with:
pvp-bounds: lower
uses: freckle/stack-upload-action@v2
env:
HACKAGE_API_KEY: ${{ secrets.HACKAGE_API_KEY }}
24 changes: 23 additions & 1 deletion package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,24 @@ homepage: http://github.com/pbrisbin/yesod-paginator
dependencies:
- base < 5

ghc-options: -Wall
ghc-options:
- -Weverything
- -Wno-all-missed-specialisations
- -Wno-missing-import-lists
- -Wno-safe
- -Wno-unsafe

when:
- condition: impl(ghc >= 9.2)
ghc-options:
- -Wno-missing-kind-signatures
- condition: impl(ghc >= 8.10)
ghc-options:
- -Wno-missing-safe-haskell-mode
- -Wno-prepositive-qualified-module
- condition: impl(ghc >= 8.8)
ghc-options:
- -fwrite-ide-info

default-extensions:
- NoImplicitPrelude
Expand Down Expand Up @@ -50,6 +67,11 @@ tests:
- yesod-core
- yesod-paginator
- yesod-test
when:
- condition: impl(ghc >= 8.8)
ghc-options:
- -Wno-missing-deriving-strategies

doctests:
main: Main.hs
source-dirs: doctest
Expand Down
4 changes: 4 additions & 0 deletions stack-lts-12.26.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resolver: lts-12.26
extra-deps:
- quickcheck-classes-0.4.13
- semirings-0.1.3.0
26 changes: 26 additions & 0 deletions stack-lts-12.26.yaml.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This file was autogenerated by Stack.
# You should not edit this file by hand.
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/lock_files

packages:
- completed:
hackage: quickcheck-classes-0.4.13@sha256:1c14bb5a4757839ce5cf02062c929675f531806283f576bf466517d506e18a1e,3427
pantry-tree:
size: 2595
sha256: c8d11b0679fc1cc2290e8842fe1bdab1e9e8824b2bf58bf1f49e3fcecb7130f1
original:
hackage: quickcheck-classes-0.4.13
- completed:
hackage: semirings-0.1.3.0@sha256:376d1fdb9e2e755d64a3feb559f71017c1095fb6683dbbb8daeaf34be6af6950,3406
pantry-tree:
size: 430
sha256: 773a7060e78d82e6333b97427d909adf1a88d27ed9c600c77c0e15f92eee94e7
original:
hackage: semirings-0.1.3.0
snapshots:
- completed:
size: 509471
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/12/26.yaml
sha256: 95f014df58d0679b1c4a2b7bf2b652b61da8d30de5f571abb0d59015ef678646
original: lts-12.26
1 change: 1 addition & 0 deletions stack-lts-14.27.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: lts-14.27
12 changes: 12 additions & 0 deletions stack-lts-14.27.yaml.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file was autogenerated by Stack.
# You should not edit this file by hand.
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/lock_files

packages: []
snapshots:
- completed:
size: 524996
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/27.yaml
sha256: 7ea31a280c56bf36ff591a7397cc384d0dff622e7f9e4225b47d8980f019a0f0
original: lts-14.27
1 change: 1 addition & 0 deletions stack-lts-16.31.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: lts-16.31
12 changes: 12 additions & 0 deletions stack-lts-16.31.yaml.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file was autogenerated by Stack.
# You should not edit this file by hand.
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/lock_files

packages: []
snapshots:
- completed:
size: 534126
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/16/31.yaml
sha256: 637fb77049b25560622a224845b7acfe81a09fdb6a96a3c75997a10b651667f6
original: lts-16.31
1 change: 1 addition & 0 deletions stack-lts-18.28.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: lts-18.28
12 changes: 12 additions & 0 deletions stack-lts-18.28.yaml.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file was autogenerated by Stack.
# You should not edit this file by hand.
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/lock_files

packages: []
snapshots:
- completed:
size: 590100
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/28.yaml
sha256: 428ec8d5ce932190d3cbe266b9eb3c175cd81e984babf876b64019e2cbe4ea68
original: lts-18.28
1 change: 1 addition & 0 deletions stack-nightly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver: nightly-2022-03-30
12 changes: 12 additions & 0 deletions stack-nightly.yaml.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file was autogenerated by Stack.
# You should not edit this file by hand.
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/lock_files

packages: []
snapshots:
- completed:
size: 539378
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2022/3/30.yaml
sha256: 745431a4c5b78cc93d81e99b2253a1e0eacd4f94e00cf17dab7cc14e665332e3
original: nightly-2022-03-30
21 changes: 4 additions & 17 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
resolver: lts-18.18
resolver: lts-19.1

extra-deps:
# for weeder
- dhall-1.40.2@sha256:db1d5f81912de498eeb8cf4535aebd76c695c016a8c5710970b61e83f3d345cb,34786
- generic-lens-2.2.0.0@sha256:4008a39f464e377130346e46062e2ac1211f9d2e256bbb1857216e889c7196be,3867
- generic-lens-core-2.2.0.0@sha256:b6b69e992f15fa80001de737f41f2123059011a1163d6c8941ce2e3ab44f8c03,2913

ghc-options:
"$locals": >
-fwrite-ide-info
-Weverything
-Wno-safe
-Wno-unsafe
-Wno-missing-import-lists
-Wno-missing-safe-haskell-mode
-Wno-prepositive-qualified-module
-Wno-all-missed-specialisations
flags:
yesod-paginator:
examples: true
31 changes: 5 additions & 26 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,10 @@
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/lock_files

packages:
- completed:
hackage: dhall-1.40.2@sha256:db1d5f81912de498eeb8cf4535aebd76c695c016a8c5710970b61e83f3d345cb,34786
pantry-tree:
size: 316011
sha256: 4f87e4e4a327a9bffacd130a3efee3a5eb3a49d3ec85ade58eecd6c3d9608b63
original:
hackage: dhall-1.40.2@sha256:db1d5f81912de498eeb8cf4535aebd76c695c016a8c5710970b61e83f3d345cb,34786
- completed:
hackage: generic-lens-2.2.0.0@sha256:4008a39f464e377130346e46062e2ac1211f9d2e256bbb1857216e889c7196be,3867
pantry-tree:
size: 2470
sha256: 93d7aae1de4cbbb2e3320b357cd744618cb17356989bd417d374aa73331e7370
original:
hackage: generic-lens-2.2.0.0@sha256:4008a39f464e377130346e46062e2ac1211f9d2e256bbb1857216e889c7196be,3867
- completed:
hackage: generic-lens-core-2.2.0.0@sha256:b6b69e992f15fa80001de737f41f2123059011a1163d6c8941ce2e3ab44f8c03,2913
pantry-tree:
size: 2202
sha256: 6918fb47f34ecf4246778b229911693b6e20fc2ce94ae8c89d69a89db4e72269
original:
hackage: generic-lens-core-2.2.0.0@sha256:b6b69e992f15fa80001de737f41f2123059011a1163d6c8941ce2e3ab44f8c03,2913
packages: []
snapshots:
- completed:
size: 586296
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/18.yaml
sha256: 63539429076b7ebbab6daa7656cfb079393bf644971156dc349d7c0453694ac2
original: lts-18.18
size: 617355
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/1.yaml
sha256: cbd5e8593869445794924668479b5bd9f1738d075898623dceacc13b2576b6e3
original: lts-19.1
1 change: 0 additions & 1 deletion test/SpecHelper.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ViewPatterns #-}
{-# OPTIONS_GHC -Wno-missing-deriving-strategies #-}
{-# OPTIONS_GHC -Wno-missing-local-signatures #-}

module SpecHelper
Expand Down
34 changes: 30 additions & 4 deletions yesod-paginator.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ library
src
default-extensions:
NoImplicitPrelude
ghc-options: -Wall
ghc-options: -Weverything -Wno-all-missed-specialisations -Wno-missing-import-lists -Wno-safe -Wno-unsafe
build-depends:
base <5
, blaze-markup
Expand All @@ -46,6 +46,12 @@ library
, transformers
, uri-encode
, yesod-core
if impl(ghc >= 9.2)
ghc-options: -Wno-missing-kind-signatures
if impl(ghc >= 8.10)
ghc-options: -Wno-missing-safe-haskell-mode -Wno-prepositive-qualified-module
if impl(ghc >= 8.8)
ghc-options: -fwrite-ide-info
default-language: Haskell2010

executable yesod-paginator-example
Expand All @@ -56,12 +62,18 @@ executable yesod-paginator-example
example
default-extensions:
NoImplicitPrelude
ghc-options: -Wall
ghc-options: -Weverything -Wno-all-missed-specialisations -Wno-missing-import-lists -Wno-safe -Wno-unsafe
build-depends:
base <5
, warp
, yesod
, yesod-paginator
if impl(ghc >= 9.2)
ghc-options: -Wno-missing-kind-signatures
if impl(ghc >= 8.10)
ghc-options: -Wno-missing-safe-haskell-mode -Wno-prepositive-qualified-module
if impl(ghc >= 8.8)
ghc-options: -fwrite-ide-info
if !(flag(examples))
buildable: False
default-language: Haskell2010
Expand All @@ -75,10 +87,16 @@ test-suite doctests
doctest
default-extensions:
NoImplicitPrelude
ghc-options: -Wall
ghc-options: -Weverything -Wno-all-missed-specialisations -Wno-missing-import-lists -Wno-safe -Wno-unsafe
build-depends:
base <5
, doctest
if impl(ghc >= 9.2)
ghc-options: -Wno-missing-kind-signatures
if impl(ghc >= 8.10)
ghc-options: -Wno-missing-safe-haskell-mode -Wno-prepositive-qualified-module
if impl(ghc >= 8.8)
ghc-options: -fwrite-ide-info
default-language: Haskell2010

test-suite test
Expand All @@ -93,7 +111,7 @@ test-suite test
test
default-extensions:
NoImplicitPrelude
ghc-options: -Wall
ghc-options: -Weverything -Wno-all-missed-specialisations -Wno-missing-import-lists -Wno-safe -Wno-unsafe
build-depends:
QuickCheck
, base <5
Expand All @@ -102,4 +120,12 @@ test-suite test
, yesod-core
, yesod-paginator
, yesod-test
if impl(ghc >= 9.2)
ghc-options: -Wno-missing-kind-signatures
if impl(ghc >= 8.10)
ghc-options: -Wno-missing-safe-haskell-mode -Wno-prepositive-qualified-module
if impl(ghc >= 8.8)
ghc-options: -fwrite-ide-info
if impl(ghc >= 8.8)
ghc-options: -Wno-missing-deriving-strategies
default-language: Haskell2010

0 comments on commit 8ea5808

Please sign in to comment.