srid / haskell-flake

A `flake-parts` Nix module for Haskell development
https://community.flake.parts/haskell-flake
MIT License
148 stars 18 forks source link

Add automated tests #25

Closed srid closed 1 year ago

srid commented 2 years ago

What is the best way to add tests for this repo? cc @roberth

I normally test branches against another branch of https://github.com/srid/haskell-template - but having something automated would be nice. https://github.com/numtide/treefmt-nix/tree/master/tests uses a sub-flake for tests.

roberth commented 2 years ago

Doesn't that lock the test's "parent" input? In flake-parts I went out of my way to avoid depending on the parent (https://github.com/hercules-ci/flake-parts/blob/main/dev/default.nix) but I don't think we should repeat that here. (But maybe I'm wrong about that) I'm kind of hoping for the lazy trees to fix the .. lock problem.

srid commented 1 year ago

Pending better ways, I'm inclined to go with the approach of https://github.com/Platonic-Systems/mission-control

We also get an example and flake template for free.