diff --git a/.github/workflows/binaries-linux-x64-stack.yml b/.github/workflows/binaries-linux-x64-stack.yml index cc554b424..b494caf8b 100644 --- a/.github/workflows/binaries-linux-x64-stack.yml +++ b/.github/workflows/binaries-linux-x64-stack.yml @@ -1,5 +1,5 @@ # Runs on any push to binaries-linux-x64-stack. -# ACTION: Builds and saves mac x64 static binaries with stack and the default ghc. May not work, +# ACTION: Builds, unit-tests and saves mac x64 static binaries with stack and the default ghc. May not work, # the cabal-based binaries-linux-x64.yml is normally used instead. name: binaries-linux-x64-stack @@ -106,15 +106,11 @@ jobs: run: | stack --allow-different-user setup --install-ghc - - name: Build with stack + - name: Build with stack and run unit tests run: | - stack --allow-different-user build --ghc-options='-optl-static -fPIC' --ghc-options=-Werror hledger # || (echo "ERROR: building hledger failed"; false) - stack --allow-different-user build --ghc-options='-optl-static -fPIC' --ghc-options=-Werror hledger-ui # || (echo "ERROR: building hledger-ui failed"; false) - stack --allow-different-user build --ghc-options='-optl-static -fPIC' --ghc-options=-Werror hledger-web # || (echo "ERROR: building hledger-web failed"; false) - - - name: Run built-in unit tests - run: | - stack exec -- hledger test + stack --allow-different-user build --test --ghc-options='-optl-static -fPIC' --ghc-options=-Werror hledger # || (echo "ERROR: building hledger failed"; false) + stack --allow-different-user build --test --ghc-options='-optl-static -fPIC' --ghc-options=-Werror hledger-ui # || (echo "ERROR: building hledger-ui failed"; false) + stack --allow-different-user build --test --ghc-options='-optl-static -fPIC' --ghc-options=-Werror hledger-web # || (echo "ERROR: building hledger-web failed"; false) - name: Gather binaries run: | diff --git a/.github/workflows/binaries-linux-x64.yml b/.github/workflows/binaries-linux-x64.yml index 534d3c055..f10f1ebcd 100644 --- a/.github/workflows/binaries-linux-x64.yml +++ b/.github/workflows/binaries-linux-x64.yml @@ -1,5 +1,5 @@ # Runs on any push to binaries-linux-x64 or binaries. -# ACTION: Builds and saves linux x64 static binaries with cabal and the ghc version below and Alpine linux, +# ACTION: Builds, unit-tests and saves linux x64 static binaries with cabal and the ghc version below and Alpine linux, # which provides the statically-linkable musl. name: binaries-linux-x64 diff --git a/.github/workflows/binaries-windows-x64.yml b/.github/workflows/binaries-windows-x64.yml index d5b53ae11..4cf8f1f79 100644 --- a/.github/workflows/binaries-windows-x64.yml +++ b/.github/workflows/binaries-windows-x64.yml @@ -1,5 +1,5 @@ # Runs on any push to binaries-windows-x64 or binaries. -# ACTION: Builds and saves windows x64 binaries with stack and the default ghc. +# ACTION: Builds, unit-tests and saves windows x64 binaries with stack and the default ghc. name: binaries-windows-x64 on: @@ -118,24 +118,24 @@ jobs: run: | ./stack --no-terminal setup --install-ghc - # - name: Install shelltestrunner - ## - export PATH=~/.local/bin:$PATH - # - if [[ ! -x ~/.local/bin/shelltest ]]; then stack install shelltestrunner-1.10; fi - # - shelltest --version - - name: Install haskell deps run: | - ./stack --no-terminal build --only-dependencies --dry-run - ./stack --no-terminal build --only-dependencies + ./stack --no-terminal build --test --only-dependencies --dry-run + ./stack --no-terminal build --test --only-dependencies # use whichever GHC is in default stack.yaml - name: Build all hledger modules warning free, optimised and minimised run: | - ./stack --no-terminal install --force-dirty --ghc-options=-fforce-recomp --ghc-options=-Werror + ./stack --no-terminal install --test --force-dirty --ghc-options=-fforce-recomp --ghc-options=-Werror # --ghc-options=-split-sections doesn't work on windows, "too many sections" # --pedantic + # - name: Install shelltestrunner + ## - export PATH=~/.local/bin:$PATH + # - if [[ ! -x ~/.local/bin/shelltest ]]; then stack install shelltestrunner-1.10; fi + # - shelltest --version + # run hledger-lib/hledger functional tests, skipping the ones for addons ## - export PATH=~/.local/bin:$PATH #- COLUMNS=80 stack exec -- shelltest --execdir -j16 hledger/test -x /_ -x /addons -x ledger-compat/ledger-baseline -x ledger-compat/ledger-regress -x ledger-compat/ledger-collected