diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 682399a..dc5adee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,7 +58,13 @@ jobs: run: cabal build --project-file=cabal.release.project - name: Test - run: cabal test --project-file=cabal.release.project all + run: cabal test --project-file=cabal.release.project --test-options "--xml=dist-newstyle/report.xml" all + + - name: Publish Test Report + uses: mikepenz/action-junit-report@v4 + if: success() || failure() # always run even if the previous step fails + with: + report_paths: 'dist-newstyle/report.xml' - name: Install run: cabal install --project-file=cabal.release.project --installdir=distribution --install-method=copy diff --git a/cabal.project b/cabal.project index 1766aa7..60eda37 100644 --- a/cabal.project +++ b/cabal.project @@ -7,6 +7,8 @@ with-compiler: ghc-9.8 -- program-locations -- haddock-location: haddock-9.8 +allow-newer: mtl, ansi-terminal, text, tasty + test-show-details: direct documentation: True @@ -29,3 +31,8 @@ source-repository-package type: git location: https://github.com/ekmett/placeholder tag: c958c36 + +source-repository-package + type: git + location: https://github.com/goodlyrottenapple/tasty-test-reporter + tag: b704130 diff --git a/confer.cabal b/confer.cabal index 83e7067..5894276 100644 --- a/confer.cabal +++ b/confer.cabal @@ -146,4 +146,5 @@ test-suite confer-test , tasty , tasty-coverage , tasty-hunit + , tasty-test-reporter , temporary diff --git a/test/Main.hs b/test/Main.hs index a5031e7..fbc1ac6 100644 --- a/test/Main.hs +++ b/test/Main.hs @@ -4,6 +4,7 @@ import GHC.List (List) import System.IO import Test.Tasty import Test.Tasty.HUnit +import Test.Tasty.Runners.Reporter qualified as Reporter import Confer.CLI.Cmd.CheckTest qualified as CheckTest import Utils @@ -12,8 +13,9 @@ main :: IO () main = do hSetBuffering stdout LineBuffering spec <- traverse (\comp -> runTestEff comp) specs - defaultMain $ - testGroup + defaultMainWithIngredients + [Reporter.ingredient] $ + testGroup "Confer Tests" spec