diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7eb1c4..7d6e655 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: ubuntu-version: 'latest' macos-version: 'latest' version: 0.1.7.1 - tests: + builds: name: ${{ matrix.ghc }} on ${{ matrix.os }} needs: generate-matrix runs-on: ${{ matrix.os }} @@ -62,15 +62,6 @@ jobs: mkdir distribution cp ${bin} distribution/print-api - - name: Test - run: cabal test --project-file=cabal.release.project --test-options "--xml=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: "report.xml" - - name: File type run: file distribution/print-api diff --git a/Makefile b/Makefile index babe53b..18fefd5 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ deps: ## Install the dependencies of the backend @cabal build --only-dependencies build: ## Build the project in fast mode - @cabal build + @cabal build -j clean: ## Remove compilation artifacts @cabal clean @@ -11,7 +11,7 @@ repl: ## Start a REPL @cabal repl test: ## Run the test suite - @cabal test + @cabal test -j lint: ## Run the code linter (HLint) @find app src compat -name "*.hs" | xargs -P $(PROCS) -I {} hlint --refactor-options="-i" --refactor {} diff --git a/cabal.project b/cabal.project index 704a796..f2ee4bd 100644 --- a/cabal.project +++ b/cabal.project @@ -2,7 +2,20 @@ packages: ./ tests: True -allow-newer: tasty-test-reporter:mtl, tasty-test-reporter:ansi-terminal, tasty-test-reporter:text, tasty-test-reporter:tasty +allow-newer: + tasty-test-reporter:mtl + , tasty-test-reporter:ansi-terminal + , tasty-test-reporter:text + , tasty-test-reporter:tasty + , tasty-test-reporter:containers + , tasty-test-reporter:filepath + , tasty-test-reporter:base + +allow-newer: + , tasty-coverage:text + , tasty-coverage:containers + , tasty-coverage:filepath + , tasty-coverage:base source-repository-package type: git diff --git a/test/IgnoreList.hs b/test/IgnoreList.hs index 7e85589..e337536 100644 --- a/test/IgnoreList.hs +++ b/test/IgnoreList.hs @@ -37,7 +37,7 @@ generateServantClientAPIWithIgnoreList = do assertExitSuccess "`cabal exec -v0 -- ghc --print-libdir`" exitCode assertExitSuccess "Fetch the archive of servant-client" =<< Process.runProcess (Process.shell "cabal get servant-client-0.20 --destdir=../") liftIO $ Directory.setCurrentDirectory "../servant-client-0.20" - let buildServantClient = Process.shell "cabal build --write-ghc-environment-files=always" + let buildServantClient = Process.shell "cabal build --allow-newer --write-ghc-environment-files=always" assertExitSuccess "Build servant-client" =<< Process.runProcess buildServantClient ignoreListPath <- liftIO $ OsPath.makeAbsolute [osp|../print-api/test/golden/servant-client-ignore-list.txt|] ignoreListFilePath <- liftIO $ OsPath.decodeUtf ignoreListPath