From cec25e9d6b75c0a5b91b2c90ab291ac305d5e914 Mon Sep 17 00:00:00 2001 From: ARATA Mizuki Date: Thu, 18 Jan 2024 19:19:17 +0900 Subject: [PATCH] CI: Compile and run the example --- .github/workflows/build.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8851469..4270c84 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -24,3 +24,13 @@ jobs: # - name: Doctest # run: stack test --stack-yaml=stack-purs${{ matrix.purs }}.yaml + + - name: Compile and run the example + working-directory: ./example + run: | + mv package.json package.json.tmp + jq --arg '.devDependencies.purescript="^${{ matrix.purs }}"' package.json.tmp > package.json + npx spago build + stack exec --stack-yaml=../stack-purs${{ matrix.purs }} -- purs-tsd-gen -d output + npx tsc --strict --module es2015 user.mts + node user.mjs