Skip to content

Go get tested! Github Actions matrix generator for your haskell projects

License

Notifications You must be signed in to change notification settings

Sereja313/get-tested

 
 

Repository files navigation

get-tested

A CLI tool that retrieves the tested-with stanza of a cabal file and formats it in such a way that GitHub Actions can use it.

Usage

Put this in your GitHub Action file

jobs:                                                                                                                   
  generateMatrix:                                                                                                       
    name: "Generate matrix from cabal"                                                                                  
    runs-on: ubuntu-latest                                                                                              
    outputs:                                                                                                            
      matrix: ${{ steps.set-matrix.outputs.matrix }}                                                                    
    steps:                                                                                                              
      - name: Checkout base repo                                                                                        
        uses: actions/checkout@v2                                                                                       
      - name: Extract the tested GHC versions                                                                           
        id: set-matrix                                                                                                  
        run: |                                                                                                          
          wget https://github.com/Kleidukos/get-tested/releases/download/v0.1.4.0/get-tested-0.1.4.0-linux-amd64 -O get-tested
          chmod +x get-tested                                                                                           
          ./get-tested --ubuntu --macos my-project.cabal >> $GITHUB_OUTPUT                                            
  tests:                                                                                                                
    name: ${{ matrix.ghc }} on ${{ matrix.os }}                                                                         
    needs: generateMatrix                                                                                               
    runs-on: ${{ matrix.os }}                                                                                           
    strategy:                                                                                                           
      matrix: ${{ fromJSON(needs.generateMatrix.outputs.matrix) }}

About

Go get tested! Github Actions matrix generator for your haskell projects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haskell 91.1%
  • Makefile 8.9%