diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0fbfc1c8c8..b86b6b8302 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -117,7 +117,7 @@ jobs: - if: needs.pre_job.outputs.should_skip_ghcide != 'true' && matrix.test name: Test ghcide # run the tests without parallelism to avoid running out of memory - run: cabal test ghcide || cabal test ghcide + run: cabal test ghcide-tests || cabal test ghcide-tests - if: matrix.test name: Test hls-plugin-api diff --git a/ghcide/test/exe/TestUtils.hs b/ghcide/test/exe/TestUtils.hs index e28f26c50c..d0c5644f41 100644 --- a/ghcide/test/exe/TestUtils.hs +++ b/ghcide/test/exe/TestUtils.hs @@ -248,10 +248,10 @@ runWithExtraFiles prefix s = withTempDir $ \dir -> do copyTestDataFiles :: FilePath -> FilePath -> IO () copyTestDataFiles dir prefix = do -- Copy all the test data files to the temporary workspace - testDataFiles <- getDirectoryFilesIO ("test/data" prefix) ["//*"] + testDataFiles <- getDirectoryFilesIO ("ghcide/test/data" prefix) ["//*"] for_ testDataFiles $ \f -> do createDirectoryIfMissing True $ dir takeDirectory f - copyFile ("test/data" prefix f) (dir f) + copyFile ("ghcide/test/data" prefix f) (dir f) withLongTimeout :: IO a -> IO a withLongTimeout = bracket_ (setEnv "LSP_TIMEOUT" "120" True) (unsetEnv "LSP_TIMEOUT") @@ -263,7 +263,7 @@ lspTestCapsNoFileWatches = lspTestCaps & L.workspace . Lens._Just . L.didChangeW openTestDataDoc :: FilePath -> Session TextDocumentIdentifier openTestDataDoc path = do - source <- liftIO $ readFileUtf8 $ "test/data" path + source <- liftIO $ readFileUtf8 $ "ghcide/test/data" path createDoc path "haskell" source pattern R :: UInt -> UInt -> UInt -> UInt -> Range