Skip to content

Commit 28c9f0e

Browse files
authored
Wrap test suite of tactics plugin into tasty test tree (haskell#1676)
1 parent b50da41 commit 28c9f0e

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,4 +172,4 @@ jobs:
172172

173173
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
174174
name: Test hls-tactics-plugin test suite
175-
run: LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-tactics-plugin --test-options="-j1"
175+
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"

plugins/hls-tactics-plugin/hls-tactics-plugin.cabal

+2
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ test-suite tests
119119
CodeAction.IntrosSpec
120120
CodeAction.UseDataConSpec
121121
ProviderSpec
122+
Spec
122123
UnificationSpec
123124
Utils
124125
hs-source-dirs:
@@ -144,6 +145,7 @@ test-suite tests
144145
, text
145146
, deepseq
146147
, tasty-hunit
148+
, tasty-hspec
147149
build-tool-depends:
148150
hspec-discover:hspec-discover
149151
default-language: Haskell2010
+8-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
{-# OPTIONS_GHC -F -pgmF hspec-discover -optF --module-name=Main #-}
1+
module Main where
2+
3+
import qualified Spec
4+
import Test.Hls
5+
import Test.Tasty.Hspec
6+
7+
main :: IO ()
8+
main = testSpecs Spec.spec >>= defaultTestRunner . testGroup "tactics"
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{-# OPTIONS_GHC -F -pgmF hspec-discover -optF --module-name=Spec #-}

0 commit comments

Comments
 (0)