Skip to content

Commit

Permalink
Fix CI (#4184)
Browse files Browse the repository at this point in the history
  • Loading branch information
soulomoon authored Apr 21, 2024
1 parent 463eb2f commit f8379bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions ghcide/test/exe/TestUtils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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
Expand Down

0 comments on commit f8379bb

Please sign in to comment.