haskell / actions

Github actions for Haskell CI
147 stars 54 forks source link

Matchers-only option #71

Open parsonsmatt opened 3 years ago

parsonsmatt commented 3 years ago

We use nix in CI to provide GHC and all relevant tools, but we also want the error matchers.

As a work around, we've got this config in our GitHub Actions file:

        # we use the Haskell setup action because it integrates error matching.
        # we don't use it to bring in GHC or any other Haskell tooling - that
        # is all provided by Nix. 
      - uses: haskell/actions/setup@v1
        # This little stanza is what we need to prevent installing a redundant
        # GHC. It does install a redundant stack, but that's a much smaller
        # problem.
        with:
          enable-stack: true
          stack-no-global: true

This takes ~0s according to GitHub, which is great.

However, it'd be ideal to either have a ghc-matchers GitHub action or a matchers-only option.

hazelweakly commented 3 years ago

That might be nice to have. This is a bit of a niche usecase (although much less niche for other languages, given Haskell's overlap with the nix community). I'd be fine supporting that option; I'm not sure when I'll have time to implement it, but in the meantime it's actually relatively easy to roll it in on your own CI pipeline.

      - run: |
            curl 'https://raw.githubusercontent.com/haskell/actions/v1/setup/matcher.json' > haskell-problem-matcher.json
            echo "::add-matcher::haskell-problem-matcher.json"

(see https://github.com/actions/toolkit/blob/master/docs/commands.md#problem-matchers for the very sparse documentation on this)