diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6a979c0..3cc7b06 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,82 +3,66 @@ name: build on: push: branches: - - master + - main pull_request: branches: - - master + - main schedule: - cron: '0 0 * * *' jobs: build: - name: ${{ matrix.os }} / Cabal ${{ matrix.cabal }} / GHC ${{ matrix.ghc }} + name: ${{ matrix.os }} / GHC ${{ matrix.ghc }} runs-on: ${{ matrix.os }} strategy: matrix: os: - - ubuntu-16.04 - cabal: - - 3.2 + - ubuntu-18.04 ghc: - - 7.4.1 - - 7.4.2 - - 7.6.1 - - 7.6.2 - - 7.6.3 - - 7.8.1 - - 7.8.2 - - 7.8.3 - - 7.8.4 - - 7.10.1 - - 7.10.2 - - 7.10.3 - - 8.0.1 - - 8.0.2 - - 8.2.1 - - 8.2.2 - - 8.4.1 - - 8.4.2 - - 8.4.3 - - 8.4.4 - - 8.6.1 - - 8.6.2 - - 8.6.3 - - 8.6.4 - - 8.6.5 - - 8.8.1 - - 8.8.2 - - 8.8.3 - - 8.8.4 - - 8.10.1 - - 8.10.2 + - '7.4' + - '7.6' + - '7.8' + - '7.10' + - '8.0' + - '8.2' + - '8.4' + - '8.6' + - '8.8' + - '8.10' + - '9.0' + - '9.2' include: - os: macos-latest - cabal: 3.2 - ghc: 8.10.2 + ghc: latest - os: windows-latest - cabal: 3.2 - ghc: 8.10.2 + ghc: latest + steps: - - uses: actions/checkout@v2 - - uses: actions/setup-haskell@v1 + - uses: actions/checkout@v3 + - uses: hspec/setup-haskell@v1 with: - cabal-version: ${{ matrix.cabal }} ghc-version: ${{ matrix.ghc }} - name: Install dependencies run: | cabal update - cabal build --only-dependencies --enable-tests --enable-benchmarks + cabal configure --enable-tests --enable-benchmarks # NOTE: --enable-tests is necessary due to https://github.com/haskell/cabal/issues/5079 + cabal build --only-dependencies + - name: Build - run: cabal build --enable-tests --enable-benchmarks all + run: cabal build all + - name: Run tests run: cabal test all --test-show-details=direct env: HSPEC_OPTIONS: --color success: - needs: [build] + needs: build runs-on: ubuntu-latest - steps: [run: echo success] + if: always() # this is required as GitHub considers "skipped" jobs as "passed" when checking branch protection rules + + steps: + - run: exit 1 + if: needs.build.result != 'success' diff --git a/package.yaml b/package.yaml index ef8c688..77277a2 100644 --- a/package.yaml +++ b/package.yaml @@ -15,5 +15,5 @@ library: tests: spec: - defaults: hspec/hspec@master + defaults: hspec/hspec@main dependencies: strip