@@ -172,8 +172,40 @@ jobs:
173 - name: Run tests
173 - name: Run tests
175− # cabal v2-test does not work with GHCJS
176− # See: https://github.com/haskell/cabal/issues/6175
178− # This invokes cabal-plan to figure out test binaries, and invokes them with node.
179 cabal-plan list-bins '*:test:*' | while read -r line; do testpkg=$(echo "$line" | perl -pe 's/:.*//'); testexe=$(echo "$line" | awk '{ print $2 }'); echo "testing $textexe in package $textpkg"; (cd "$(pkgdir $testpkg)" && nodejs "$testexe".jsexe/all.js); done
175 cabal-plan list-bins '*:test:*' | while read -r line; do testpkg=$(echo "$line" | perl -pe 's/:.*//'); testexe=$(echo "$line" | awk '{ print $2 }'); echo "testing $textexe in package $textpkg"; (cd "$(pkgdir $testpkg)" && nodejs "$testexe".jsexe/all.js); done
179+ runs-on: "ubuntu-latest"
182+ - uses: actions/checkout@v2
183+ - uses: cachix/install-nix-action@v13
186+ trusted-public-keys = ryantrinkle.com-1:JJiAKaRv9mWgpVAz8dwewnZe0AzzEAzPkagE9SP5NWI=1aba6f367982bd6dd78ec2fda75ab246a62d32c5 cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
187+ substituters = https://nixcache.reflex-frp.org https://cache.nixos.org/
190+ # Override cabal.project with the lightweight GHCJS one
191+ cp cabal.ghcjs.project cabal.project
193+ nix-shell ghcjs.nix --run "cabal v2-update && cabal v2-freeze"
195+ - uses: actions/cache@v2.1.3
196+ name: Cache ~/.cabal/store and dist-newstyle
201+ key: ${{ runner.os }}-ghcjs8.6-${{ hashFiles('cabal.project.freeze') }}
203+ ${{ runner.os }}-ghcjs8.6-
207+ nix-shell ghcjs.nix --run "cabal v2-build --ghcjs --enable-tests --enable-benchmarks all"
211+ nix-shell ghcjs.nix --run ".github/run-ghcjs-tests.sh"