Skip to content

Wrap test suite of tactics plugin into tasty test tree #1676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,4 @@ jobs:

- if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
name: Test hls-tactics-plugin test suite
run: LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-tactics-plugin --test-options="-j1"
run: cabal test hls-tactics-plugin --test-options="-j1 --rerun-update" || cabal test hls-tactics-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-tactics-plugin --test-options="-j1 --rerun"
2 changes: 2 additions & 0 deletions plugins/hls-tactics-plugin/hls-tactics-plugin.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ test-suite tests
CodeAction.IntrosSpec
CodeAction.UseDataConSpec
ProviderSpec
Spec
UnificationSpec
Utils
hs-source-dirs:
Expand All @@ -144,6 +145,7 @@ test-suite tests
, text
, deepseq
, tasty-hunit
, tasty-hspec
build-tool-depends:
hspec-discover:hspec-discover
default-language: Haskell2010
Expand Down
9 changes: 8 additions & 1 deletion plugins/hls-tactics-plugin/test/Main.hs
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
{-# OPTIONS_GHC -F -pgmF hspec-discover -optF --module-name=Main #-}
module Main where

import qualified Spec
import Test.Hls
import Test.Tasty.Hspec

main :: IO ()
main = testSpecs Spec.spec >>= defaultTestRunner . testGroup "tactics"
1 change: 1 addition & 0 deletions plugins/hls-tactics-plugin/test/Spec.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{-# OPTIONS_GHC -F -pgmF hspec-discover -optF --module-name=Spec #-}