Milestone 4 #240
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: covenant | |
| on: | |
| pull_request: | |
| 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/[email protected] | |
| with: | |
| cabal-file: covenant.cabal | |
| ubuntu-version: "latest" | |
| macos-version: "latest" | |
| windows-version: "latest" | |
| version: 0.1.7.1 | |
| ormolu: | |
| name: "Check formatting with Ormolu" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout base repo | |
| uses: actions/checkout@v3 | |
| - name: Run Ormolu | |
| uses: haskell-actions/run-ormolu@v16 | |
| with: | |
| mode: "check" | |
| hlint: | |
| name: "Check with HLint" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout base repo | |
| uses: actions/checkout@v3 | |
| - name: Set up HLint | |
| uses: haskell-actions/hlint-setup@v2 | |
| with: | |
| version: 3.8 | |
| - name: Run HLint | |
| uses: haskell-actions/hlint-run@v2 | |
| with: | |
| path: src/ | |
| fail-on: warning | |
| cabal-gild: | |
| name: "Check Cabal file with cabal-gild" | |
| needs: [ormolu, hlint] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up environment | |
| run: | | |
| echo "$HOME/.cabal/bin" >> $GITHUB_PATH | |
| - name: Set up Haskell | |
| id: setup-haskell | |
| uses: haskell-actions/setup@v2 | |
| with: | |
| ghc-version: "9.8" | |
| cabal-version: latest | |
| - name: Check out cabal-gild | |
| uses: actions/checkout@v3 | |
| with: | |
| repository: 'tfausak/cabal-gild' | |
| ref: 'f30f35eadd68366b6e3087c060df83eef09be4b2' | |
| - name: Freeze | |
| run: cabal freeze | |
| - name: Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.setup-haskell.outputs.cabal-store }} | |
| key: ${{ runner.os}}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} | |
| restore-keys: ${{ runner.os }}-${{ matrix.ghc }}- | |
| - name: Install cabal-gild | |
| run: cabal install | |
| - name: Check out base repo | |
| uses: actions/checkout@v3 | |
| - name: Run cabal-gild | |
| run: cabal-gild --input=covenant.cabal --mode=check | |
| tests: | |
| name: ${{ matrix.ghc }} on ${{ matrix.os }} | |
| needs: [generate-matrix, ormolu, hlint] | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }} | |
| steps: | |
| - name: Checkout base repo | |
| uses: actions/checkout@v3 | |
| - name: Set up Haskell | |
| id: setup-haskell | |
| uses: haskell-actions/setup@v2 | |
| with: | |
| ghc-version: ${{ matrix.ghc }} | |
| cabal-version: latest | |
| - name: Freeze | |
| run: cabal freeze | |
| - name: Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.setup-haskell.outputs.cabal-store }} | |
| key: ${{ runner.os}}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} | |
| restore-keys: ${{ runner.os }}-${{ matrix.ghc }}- | |
| - name: Build | |
| run: cabal build | |
| - name: Run renaming suite | |
| run: cabal test renaming | |
| - name: Run base functor suite | |
| run: cabal test base-functor | |
| - name: Run type applications suite | |
| run: cabal test type-applications | |
| - name: Run primops suite | |
| run: cabal test primops | |
| - name: Run ASG suite | |
| run: cabal test asg | |
| - name: Run Boehm-Berrarducci suite | |
| run: cabal test bb | |
| - name: Run kind checking suite | |
| run: cabal test kindcheck |