crispywalrus / github-actions-dhall

Dhall helpers for github actions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

github-actions-dhall

This is a demonstration using Dhall to generate YAML for github actions.

github-actions-dhall is self-hosting.

Example

Haskell

Store the following in example.dhall:

let haskellCi = https://raw.githubusercontent.com/vmchale/github-actions-dhall/master/haskell-ci.dhall

in    haskellCi.generalCi
        haskellCi.matrixSteps
        ( Some
            { ghc = [ haskellCi.GHC.GHC883, haskellCi.GHC.GHC865 ]
            , cabal = [ haskellCi.Cabal.Cabal30 ]
            }
        )
    : haskellCi.CI.Type

Then, generate YAML with dhall-to-yaml --file example.dhall

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: "actions/checkout@v1"
      - uses: "actions/setup-haskell@v1"
        with:
          cabal-version: "${{ matrix.cabal }}"
          ghc-version: "${{ matrix.ghc }}"
      - name: "Install dependencies"
        run: |
          cabal update
          cabal build --enable-tests --enable-benchmarks --only-dependencies
      - name: Build
        run: "cabal build --enable-tests --enable-benchmarks"
      - name: Tests
        run: "cabal test"
      - name: Documentation
        run: "cabal haddock"
    strategy:
      matrix:
        cabal:
          - "3.0"
        ghc:
          - "8.8.3"
          - "8.6.5"
name: "Haskell CI"
on:
  - push

Have a look at hlint-lib for a more "organic" example.

About

Dhall helpers for github actions

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Dhall 99.0%Language:Makefile 1.0%