From 52234b1e66853cc545c886cfd157178209e058d6 Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Sun, 1 Sep 2024 14:06:26 -0700 Subject: [PATCH] Run unit tests in GitHub actions --- .github/workflows/build.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b0d1085d0..d4e3557af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,6 +42,29 @@ jobs: name: source path: source/ + run_tests: + name: Run tests + needs: package_source + runs-on: ubuntu-latest + steps: + - name: Download artifacts + uses: actions/download-artifact@v4 + + - name: Install dependencies + run: | + apt-get update && apt-get install ghc cabal-install + cabal update + + - name: Unpack source + run: | + cd source + tar --strip-components=1 xvzf source.tar.gz + + - name: Build and run tests + run: | + cd source + cabal test + build_source: name: Build needs: package_source