Skip to content

add get-tested runs. #4

add get-tested runs.

add get-tested runs. #4

Workflow file for this run

name: Build cabal-audit with many ghc versions
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
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: cabal-audit.cabal
ubuntu-version: "latest"
macos-version: "latest"
windows-version: "latest"
version: 0.1.7.0
tests:
name: ${{ matrix.ghc }} on ${{ matrix.os }}
needs: generate-matrix
runs-on: ${{ matrix.os }}
strategy:
matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Haskell
id: setup-haskell
uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: 'latest'
- name: Configure
run: cabal configure --enable-tests
- name: Freeze
run: cabal freeze
- name: Cache
uses: actions/[email protected]
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 packages from security-advisories
run: |
cabal install git://github.com/haskell/security-advisories.git#main:osv
cabal install git://github.com/haskell/security-advisories.git#main:cvss
cabal install git://github.com/haskell/security-advisories.git#main:hsec-core
cabal install git://github.com/haskell/security-advisories.git#main:hsec-tools
- name: Build
run: cabal build
- name: Test
run: cabal test all