Bump prettyprinter upper bound, migrate to github actions (#109)

This commit is contained in:
Jan Hrcek 2021-01-28 10:40:04 +01:00 committed by GitHub
parent 4d06516ee6
commit 0a761e3549
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 134 additions and 98 deletions

123
.github/workflows/haskell-ci.yml vendored Normal file
View File

@ -0,0 +1,123 @@
name: CI
on:
pull_request:
push:
branches: [master]
jobs:
cabal:
name: ${{ matrix.os }} / ghc ${{ matrix.ghc }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
cabal: ["3.2"]
ghc:
- "8.4.4"
- "8.6.5"
- "8.8.4"
- "8.10.3"
exclude:
# Test only with latest GHC on windows and macOS
- os: macOS-latest
ghc: 8.4.4
- os: macOS-latest
ghc: 8.6.5
- os: macOS-latest
ghc: 8.8.4
- os: windows-latest
ghc: 8.4.4
- os: windows-latest
ghc: 8.6.5
- os: windows-latest
ghc: 8.8.4
steps:
- uses: actions/checkout@v2
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
- uses: haskell/actions/setup@v1
id: setup-haskell-cabal
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- name: Configure
run: |
cabal configure --enable-tests --enable-benchmarks --test-show-details=direct
- name: Freeze
run: |
cabal freeze
- uses: actions/cache@v2.1.3
name: Cache ~/.cabal/store
with:
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
- name: Install dependencies
run: |
cabal build all --only-dependencies
- name: Build
run: |
cabal build all
- name: Test
run: |
cabal test all
stack:
name: stack / ghc ${{ matrix.ghc }}
runs-on: ubuntu-latest
strategy:
matrix:
stack: ["2.5.1"]
ghc: ["8.10.3"]
steps:
- uses: actions/checkout@v2
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
- uses: haskell/actions/setup@v1
name: Setup Haskell Stack
with:
ghc-version: ${{ matrix.ghc }}
stack-version: ${{ matrix.stack }}
- uses: actions/cache@v2.1.3
name: Cache ~/.stack
with:
path: ~/.stack
key: ${{ runner.os }}-${{ matrix.ghc }}-stack
- name: Install dependencies
run: |
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks --only-dependencies
- name: Build
run: |
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks
- name: Test
run: |
stack test --system-ghc
frontend:
name: frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v1
- name: Build and test
working-directory: frontend
run: |
npm install -g create-elm-app@5.22.0
elm-app build
elm-app test

View File

@ -1,72 +0,0 @@
sudo: true
language: haskell
git:
depth: 5
cabal: "3.0"
cache:
directories:
- "$HOME/.cabal/store"
- "$HOME/.stack"
- "$TRAVIS_BUILD_DIR/.stack-work"
matrix:
include:
# Cabal
- ghc: 8.4.4
- ghc: 8.6.5
- ghc: 8.8.4
- ghc: 8.10.2
# stack
- ghc: 8.4.4
env: STACK_YAML="$TRAVIS_BUILD_DIR/stack-8.4.4.yaml"
- ghc: 8.6.5
env: STACK_YAML="$TRAVIS_BUILD_DIR/stack-8.6.5.yaml"
- ghc: 8.8.3
env: STACK_YAML="$TRAVIS_BUILD_DIR/stack.yaml"
# elm
- language: elm
cache:
directories:
- "$HOME/.npm"
- "$TRAVIS_BUILD_DIR/frontend/node_modules"
install:
- cd frontend/
- npm install -g create-elm-app@4.2.4
- npm install
script:
- elm-app build
- elm-app test
install:
- |
if [ -z "$STACK_YAML" ]; then
ghc --version
cabal --version
cabal update
cabal build --enable-tests --enable-benchmarks
else
# install stack
curl -sSL https://get.haskellstack.org/ | sh
# build project with stack
stack --version
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks
fi
script:
- |
if [ -z "$STACK_YAML" ]; then
cabal test --enable-tests
else
stack test --system-ghc
fi
notifications:
email: false

View File

@ -14,9 +14,9 @@ import Types (OneType, defaultOneType)
type TypesApi
-- | Get 'OneType' from the backend side
-- Get 'OneType' from the backend side
= "get" :> Get '[JSON] OneType
-- | Receive 'OneType' from the frontend side
-- Receive 'OneType' from the frontend side
:<|> "post" :> ReqBody '[JSON] OneType :> Post '[JSON] Bool
typesApi :: Proxy TypesApi

View File

@ -21,7 +21,7 @@ extra-doc-files: README.md
tested-with: GHC == 8.4.4
GHC == 8.6.5
GHC == 8.8.4
GHC == 8.10.2
GHC == 8.10.3
source-repository head
type: git
@ -73,7 +73,7 @@ library
build-depends: aeson >= 1.3
, directory ^>= 1.3
, filepath ^>= 1.4
, prettyprinter >= 1.2.1 && < 1.7
, prettyprinter >= 1.2.1 && < 1.8
, text ^>= 1.2
, time

View File

@ -7,25 +7,25 @@
"dependencies": {
"direct": {
"NoRedInk/elm-json-decode-pipeline": "1.0.0",
"elm/browser": "1.0.0",
"elm/core": "1.0.2",
"elm/browser": "1.0.2",
"elm/core": "1.0.5",
"elm/html": "1.0.0",
"elm/http": "2.0.0",
"elm/json": "1.1.3",
"elm/time": "1.0.0",
"elm/url": "1.0.0",
"rtfeldman/elm-iso8601-date-strings": "1.1.2"
"rtfeldman/elm-iso8601-date-strings": "1.1.3"
},
"indirect": {
"elm/bytes": "1.0.8",
"elm/file": "1.0.4",
"elm/file": "1.0.5",
"elm/parser": "1.1.0",
"elm/virtual-dom": "1.0.0"
"elm/virtual-dom": "1.0.2"
}
},
"test-dependencies": {
"direct": {
"elm-explorations/test": "1.0.0"
"elm-explorations/test": "1.2.2"
},
"indirect": {
"elm/random": "1.0.0"

View File

@ -1,13 +0,0 @@
resolver: lts-12.26
extra-deps:
- Cabal-2.4.1.0@rev:0
- hspec-2.7.1@sha256:0aa48928ce80a34f8ff8c5ef114bb6807edfb8d884bcd7211eceed710e7fb7a8,1769
- mtl-2.2.2@sha256:1050fb71acd9f5d67da7d992583f5bd0eb14407b9dc7acc122af1b738b706ca3,2261
- parsec-3.1.13.0@sha256:d56210cf092db6e43024d9e8871c7e05a8e9e36e9aec09356e5bd401ea8f5a0c,4121
- text-1.2.3.1@sha256:fc9719142e5cdd6f254b3f4831b133d3fad697ae9b54fe26424f0e023c8cc87d,8539
# for hspec
- QuickCheck-2.13.2@sha256:ad4e5adbd1c9dc0221a44307b992cb040c515f31095182e47aa7e974bc461df1,6952
- hspec-core-2.7.1@sha256:2a6dc7fa989e6feed1ff1f9fbd376e8b7e824216a981282cb0c8d5643c7a085b,4506
- hspec-discover-2.7.1@sha256:e8ce36741c06b41de58069814a7d3b7314bdeaab35ae573e3c924739011e0c29,2243
- splitmix-0.0.3@sha256:a27ceded6f6eb37c8eef67a34afac589d281cd1548e8ae8b75ac7dfd3b293830,4728

View File

@ -1,2 +0,0 @@
resolver: lts-14.4

View File

@ -1,2 +1,2 @@
resolver: lts-16.2
resolver: lts-17.0