From c0f28f440ea361594fcfde8541ad117e54a4c161 Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Tue, 23 May 2023 18:14:12 +0700 Subject: [PATCH 1/2] Run tests in parallel + get rid of `-with-rtsopts=-N` (fixes #59) --- package.yaml | 4 +--- test/SpecHook.hs | 7 +++++++ 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 test/SpecHook.hs diff --git a/package.yaml b/package.yaml index 5b6a7e5..af0e545 100644 --- a/package.yaml +++ b/package.yaml @@ -35,11 +35,9 @@ tests: source-dirs: test ghc-options: - -threaded - - -rtsopts - - -with-rtsopts=-N dependencies: - base64-bytestring - - hspec == 2.* + - hspec >= 2.8.3 && < 3 - temporary - typed-process typed-process-test-single-threaded: diff --git a/test/SpecHook.hs b/test/SpecHook.hs new file mode 100644 index 0000000..cfb1f0d --- /dev/null +++ b/test/SpecHook.hs @@ -0,0 +1,7 @@ +module SpecHook where + +import Test.Hspec +import GHC.Conc + +hook :: Spec -> Spec +hook spec = runIO (getNumProcessors >>= setNumCapabilities) >> parallel spec From 608a8cfdb071eaab72644d2d8cc454ffa921daf7 Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Wed, 24 May 2023 12:23:38 +0700 Subject: [PATCH 2/2] Update tests.yml --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 40b31d5..98c37de 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - resolver: [nightly, lts-17, lts-16, lts-14] + resolver: [nightly, lts-20, lts-19] # Bugs in GHC make it crash too often to be worth running #exclude: # - os: windows-latest