This repository was archived by the owner on Apr 20, 2026. It is now read-only.
chore: Remove semantic-release-hackage #76
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| concurrency: | |
| group: build-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| generate-matrix: | |
| name: "Generate matrix from cabal" | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Extract the tested GHC versions | |
| id: set-matrix | |
| uses: kleidukos/get-tested@v0.1.7.0 | |
| with: | |
| cabal-file: hspec-golden.cabal | |
| ubuntu-version: "latest" | |
| macos-version: "latest" | |
| version: 0.1.7.0 | |
| build-and-test: | |
| name: GHC ${{ matrix.ghc }} on ${{ matrix.os }} | |
| needs: generate-matrix | |
| strategy: | |
| matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }} | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Setup Haskell | |
| id: setup-haskell-cabal | |
| uses: haskell-actions/setup@v2 | |
| with: | |
| ghc-version: ${{ matrix.ghc }} | |
| cabal-version: "3.8" | |
| - name: Install LLVM (macOS) | |
| if: runner.os == 'macOS' | |
| uses: KyleMayes/install-llvm-action@v2 | |
| with: | |
| version: "14" | |
| - name: Update cabal | |
| run: cabal update | |
| - name: Freeze dependencies | |
| run: cabal freeze --enable-tests | |
| - name: Cache dependencies and dist-newstyle | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ steps.setup-haskell-cabal.outputs.cabal-store }} | |
| dist-newstyle | |
| key: dependencies-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} | |
| restore-keys: | | |
| dependencies-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} | |
| dependencies-${{ runner.os }}-${{ matrix.ghc }}- | |
| - name: Install dependencies | |
| run: cabal install --only-dependencies | |
| - name: Build project | |
| run: cabal build --enable-tests | |
| - name: Run tests | |
| run: cabal test --enable-tests |