Use new CI script, drop ‘stack.yaml’ from repo (#284)

This commit is contained in:
Mark Karpov 2018-03-17 03:16:11 +07:00 committed by mrkkrp
parent 0842b6f011
commit 663c9f1a96
7 changed files with 28 additions and 20 deletions

1
.gitignore vendored
View File

@ -25,3 +25,4 @@ cabal.project.local
cabal.sandbox.config cabal.sandbox.config
dist-*/ dist-*/
dist/ dist/
stack.yaml

View File

@ -4,8 +4,8 @@ sudo: false
cache: cache:
directories: directories:
- ~/.ghc - ~/.cabal/packages
- ~/.cabal - ~/.cabal/store
matrix: matrix:
include: include:
@ -24,17 +24,15 @@ before_install:
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
install: install:
- cabal --version - cabal --version
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]" - ghc --version
- travis_retry cabal update - travis_retry cabal update
- cabal install --only-dependencies --enable-tests
script: script:
- cabal configure --enable-tests --enable-coverage -v2 -f dev - cabal new-build --enable-tests --enable-benchmarks --flags=dev
- travis_wait 60 cabal build - cabal new-test
- travis_wait 20 cabal test --show-details=always --test-option=--qc-max-success=1000 - cabal new-haddock
- cabal sdist - cabal sdist
- cabal haddock | grep "100%" | wc -l | grep "11"
notifications: notifications:
email: false email: false

View File

@ -1,3 +1,4 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE OverloadedStrings #-}
module Main (main) where module Main (main) where
@ -12,6 +13,10 @@ import Text.Megaparsec.Char
import qualified Data.Text as T import qualified Data.Text as T
import qualified Text.Megaparsec.Char.Lexer as L import qualified Text.Megaparsec.Char.Lexer as L
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative hiding (many, some)
#endif
-- | The type of parser that consumes 'String's. -- | The type of parser that consumes 'String's.
type Parser = Parsec Void Text type Parser = Parsec Void Text

View File

@ -1,6 +1,6 @@
name: megaparsec name: megaparsec
version: 6.3.0 version: 6.3.0
cabal-version: >= 1.18 cabal-version: 1.18
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.1 tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.1
license: BSD2 license: BSD2
license-file: LICENSE.md license-file: LICENSE.md
@ -67,14 +67,15 @@ library
default-language: Haskell2010 default-language: Haskell2010
test-suite tests test-suite tests
main-is: Spec.hs main-is: Main.hs
hs-source-dirs: tests hs-source-dirs: tests
type: exitcode-stdio-1.0 type: exitcode-stdio-1.0
if flag(dev) if flag(dev)
ghc-options: -O0 -Wall -Werror ghc-options: -O0 -Wall -Werror
else else
ghc-options: -O2 -Wall ghc-options: -O2 -Wall
other-modules: Control.Applicative.CombinatorsSpec other-modules: Spec
, Control.Applicative.CombinatorsSpec
, Control.Monad.CombinatorsSpec , Control.Monad.CombinatorsSpec
, Test.Hspec.Megaparsec , Test.Hspec.Megaparsec
, Test.Hspec.Megaparsec.AdHoc , Test.Hspec.Megaparsec.AdHoc
@ -99,6 +100,7 @@ test-suite tests
, scientific >= 0.3.1 && < 0.4 , scientific >= 0.3.1 && < 0.4
, text >= 0.2 && < 1.3 , text >= 0.2 && < 1.3
, transformers >= 0.4 && < 0.6 , transformers >= 0.4 && < 0.6
build-tools: hspec-discover >= 2.0 && < 3.0
if !impl(ghc >= 8.0) if !impl(ghc >= 8.0)
build-depends: semigroups == 0.18.* build-depends: semigroups == 0.18.*
if !impl(ghc >= 7.10) if !impl(ghc >= 7.10)

View File

@ -1,5 +0,0 @@
resolver: lts-10.0
packages:
- '.'
extra-deps:
- parser-combinators-0.4.0

7
tests/Main.hs Normal file
View File

@ -0,0 +1,7 @@
module Main (main) where
import Test.Hspec.Runner
import Spec (spec)
main :: IO ()
main = hspecWith defaultConfig { configQuickCheckMaxSuccess = Just 1000 } spec

View File

@ -1 +1 @@
{-# OPTIONS_GHC -F -pgmF hspec-discover #-} {-# OPTIONS_GHC -F -pgmF hspec-discover -optF --module-name=Spec #-}