diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..760690b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,50 @@ +name: build + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + name: ${{ matrix.os }} / GHC ${{ matrix.ghc }} + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: + - ubuntu-16.04 # https://launchpad.net/~hvr/+archive/ubuntu/ghc?field.series_filter=xenial + ghc: + - '7.4.2' + - '7.6.3' + - '7.8.4' + - '7.10' + - '8.0' + - '8.2' + - '8.4' + - '8.6' + - '8.8' + - '8.10' + include: + - os: macos-latest + ghc: latest + - os: windows-latest + ghc: latest + steps: + - uses: actions/checkout@v2 + - uses: haskell/actions/setup@v1 + with: + ghc-version: ${{ matrix.ghc }} + - uses: sol/run-haskell-tests@v1 + + success: + needs: build + runs-on: ubuntu-latest + if: always() # this is required as GitHub considers "skipped" jobs as "passed" when checking branch protection rules + + steps: + - run: false + if: needs.build.result != 'success' diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4bccc91..0000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -sudo: false - -env: - - CABALVER=1.18 GHCVER=7.6.3 - - CABALVER=1.18 GHCVER=7.8.4 - - CABALVER=1.22 GHCVER=7.10.2 - - CABALVER=1.24 GHCVER=8.0.1 - -addons: - apt: - sources: - - hvr-ghc - packages: - - ghc-7.6.3 - - ghc-7.8.4 - - ghc-7.10.2 - - ghc-8.0.1 - - cabal-install-1.18 - - cabal-install-1.22 - - cabal-install-1.24 - -before_install: - - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH - - ghc --version - - cabal --version - - travis_retry cabal update - - cabal install --enable-tests --only-dep - -script: - - cabal configure --enable-tests --ghc-options=-Werror && cabal build && cabal test diff --git a/cabal.project b/cabal.project new file mode 100644 index 0000000..e1026e7 --- /dev/null +++ b/cabal.project @@ -0,0 +1,5 @@ +packages: + hspec-expectations.cabal + +package hspec-expectations + ghc-options: -Werror