@@ -20,12 +20,20 @@ jobs:
20
20
outputs :
21
21
should_skip : ${{ steps.skip_check.outputs.should_skip }}
22
22
should_skip_ghcide : ${{ steps.skip_ghcide_check.outputs.should_skip }}
23
- ghcs : ${{ steps.ghcs.outputs.ghcs }}
23
+ ghcs : ${{ steps.matrix-inputs.outputs.ghcs }}
24
+ packages : ${{ steps.matrix-inputs.outputs.packages }}
25
+ exclusions : ${{ steps.matrix-inputs.outputs.exclusions }}
26
+
24
27
steps :
25
- # Need the repo checked out in order to read the file
28
+ # Need the repo checked out in order to read the files
26
29
- uses : actions/checkout@v3
27
- - id : ghcs
28
- run : echo "ghcs=$(cat ./.github/workflows/supported-ghc-versions.json)" >> $GITHUB_OUTPUT
30
+
31
+ - id : matrix-inputs
32
+ run : |
33
+ echo "ghcs=$(cat ./.github/workflows/supported-ghc-versions.json)" >> $GITHUB_OUTPUT
34
+ echo "packages=$(cat ./.github/workflows/packages.json | jq '[.[] | .package]')" >> $GITHUB_OUTPUT
35
+ echo "exclusions=$(cat ./.github/workflows/packages.json | jq '[.[] | .package as $package | (.excluded_ghcs[] | {package: $package, ghc: .})]')" >> $GITHUB_OUTPUT
36
+
29
37
- id : skip_check
30
38
31
39
with :
67
75
# to update the ghc versions in 'caching.yml'.
68
76
matrix :
69
77
ghc : ${{ fromJSON(needs.pre_job.outputs.ghcs) }}
78
+ package : ${{ fromJSON(needs.pre_job.outputs.packages) }}
70
79
os :
71
80
- ubuntu-latest
72
81
- macOS-latest
78
87
test : true
79
88
- os : windows-latest
80
89
test : true
90
+ exclude : ${{ fromJSON(needs.pre_job.outputs.exclusions) }}
81
91
82
92
steps :
83
93
- uses : actions/checkout@v3
87
97
ghc : ${{ matrix.ghc }}
88
98
os : ${{ runner.os }}
89
99
90
- - name : Build
91
- run : cabal build
92
-
93
100
- name : Set test options
94
101
# run the tests without parallelism, otherwise tasty will attempt to run
95
102
# all functional test cases simultaneously which causes way too many hls
@@ -103,147 +110,18 @@ jobs:
103
110
cache-name : cache-test-log
104
111
with :
105
112
path : " **/.tasty-rerun-log*"
106
- key : v1-${{ runner.os }}-${{ matrix.ghc }}-test-log-${{ github.sha }}
107
-
108
- - if : matrix.test
109
- name : Test hls-graph
110
- run : cabal test hls-graph --test-options="$TEST_OPTS"
111
-
112
- - if : needs.pre_job.outputs.should_skip_ghcide != 'true' && matrix.test
113
- name : Test ghcide
114
- # run the tests without parallelism to avoid running out of memory
115
- run : cabal test ghcide --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test ghcide --test-options="$TEST_OPTS"
113
+ key : v1-${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.package}}-test-log-${{ github.sha }}
116
114
117
- - if : matrix.test
118
- name : Test hls-plugin-api
119
- run : cabal test hls-plugin-api --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-plugin-api --test-options="$TEST_OPTS"
120
-
121
- - if : matrix.test
122
- name : Test func-test suite
123
- env :
124
- HLS_TEST_EXE : hls
125
- HLS_WRAPPER_TEST_EXE : hls-wrapper
126
- run : cabal test func-test --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test func-test --test-options="$TEST_OPTS"
115
+ - name : Build ${{ matrix.package }}
116
+ run : cabal build ${{ matrix.package }}
127
117
128
118
- if : matrix.test
129
- name : Test wrapper-test suite
119
+ name : Test ${{ matrix.package }}
120
+ # For the func and wrapper tests
130
121
env :
131
122
HLS_TEST_EXE : hls
132
123
HLS_WRAPPER_TEST_EXE : hls-wrapper
133
- run : cabal test wrapper-test --test-options="$TEST_OPTS --rerun-log-file .tasty-rerun-log-wrapper"
134
-
135
- - if : matrix.test
136
- name : Test hls-refactor-plugin
137
- run : cabal test hls-refactor-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-refactor-plugin --test-options="$TEST_OPTS"
138
-
139
- - if : matrix.test
140
- name : Test hls-floskell-plugin
141
- run : cabal test hls-floskell-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-floskell-plugin --test-options="$TEST_OPTS"
142
-
143
- - if : matrix.test
144
- name : Test hls-class-plugin
145
- run : cabal test hls-class-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-class-plugin --test-options="$TEST_OPTS"
146
-
147
- - if : matrix.test
148
- name : Test hls-pragmas-plugin
149
- run : cabal test hls-pragmas-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-pragmas-plugin --test-options="$TEST_OPTS"
150
-
151
- - if : matrix.test && matrix.ghc != '9.4.4'
152
- name : Test hls-eval-plugin
153
- run : cabal test hls-eval-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-eval-plugin --test-options="$TEST_OPTS"
154
-
155
- - if : matrix.test && matrix.ghc != '9.2.5' && matrix.ghc != '9.4.4'
156
- name : Test hls-haddock-comments-plugin
157
- run : cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS"
158
-
159
- - if : matrix.test
160
- name : Test hls-splice-plugin
161
- run : cabal test hls-splice-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-splice-plugin --test-options="$TEST_OPTS"
162
-
163
- - if : matrix.test
164
- name : Test hls-stylish-haskell-plugin
165
- run : cabal test hls-stylish-haskell-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-stylish-haskell-plugin --test-options="$TEST_OPTS"
166
-
167
- - if : matrix.test
168
- name : Test hls-ormolu-plugin
169
- run : cabal test hls-ormolu-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-ormolu-plugin --test-options="$TEST_OPTS"
170
-
171
- - if : matrix.test
172
- name : Test hls-fourmolu-plugin
173
- run : cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS"
174
-
175
- - if : matrix.test && matrix.ghc != '9.2.5' && matrix.ghc != '9.4.4'
176
- name : Test hls-tactics-plugin test suite
177
- run : cabal test hls-tactics-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-tactics-plugin --test-options="$TEST_OPTS"
178
-
179
- - if : matrix.test
180
- name : Test hls-refine-imports-plugin test suite
181
- run : cabal test hls-refine-imports-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-refine-imports-plugin --test-options="$TEST_OPTS"
182
-
183
- - if : matrix.test
184
- name : Test hls-explicit-imports-plugin test suite
185
- run : cabal test hls-explicit-imports-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-explicit-imports-plugin --test-options="$TEST_OPTS"
186
-
187
- - if : matrix.test
188
- name : Test hls-call-hierarchy-plugin test suite
189
- run : cabal test hls-call-hierarchy-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-call-hierarchy-plugin --test-options="$TEST_OPTS"
190
-
191
- - if : matrix.test && matrix.os != 'windows-latest'
192
- name : Test hls-rename-plugin test suite
193
- run : cabal test hls-rename-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-rename-plugin --test-options="$TEST_OPTS"
194
-
195
- - if : matrix.test
196
- name : Test hls-hlint-plugin test suite
197
- run : cabal test hls-hlint-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-hlint-plugin --test-options="$TEST_OPTS"
198
-
199
- - if : matrix.test && matrix.ghc != '9.0.2' && matrix.ghc != '9.2.5' && matrix.ghc != '9.4.4'
200
- name : Test hls-stan-plugin test suite
201
- run : cabal test hls-stan-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-stan-plugin --test-options="$TEST_OPTS"
202
-
203
- - if : matrix.test
204
- name : Test hls-module-name-plugin test suite
205
- run : cabal test hls-module-name-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-module-name-plugin --test-options="$TEST_OPTS"
206
-
207
- - if : matrix.test
208
- name : Test hls-alternate-number-format-plugin test suite
209
- run : cabal test hls-alternate-number-format-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-alternate-number-format-plugin --test-options="$TEST_OPTS"
210
-
211
- - if : matrix.test
212
- name : Test hls-qualify-imported-names-plugin test suite
213
- run : cabal test hls-qualify-imported-names-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-qualify-imported-names-plugin --test-options="$TEST_OPTS"
214
-
215
- - if : matrix.test
216
- name : Test hls-code-range-plugin test suite
217
- run : cabal test hls-code-range-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-code-range-plugin --test-options="$TEST_OPTS"
218
-
219
- - if : matrix.test
220
- name : Test hls-change-type-signature test suite
221
- run : cabal test hls-change-type-signature-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-change-type-signature-plugin --test-options="$TEST_OPTS"
222
-
223
- - if : matrix.test
224
- name : Test hls-gadt-plugin test suit
225
- run : cabal test hls-gadt-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-gadt-plugin --test-options="$TEST_OPTS"
226
-
227
- - if : matrix.test
228
- name : Test hls-explicit-fixity-plugin test suite
229
- run : cabal test hls-explicit-fixity-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-explicit-fixity-plugin --test-options="$TEST_OPTS"
230
-
231
- - if : matrix.test
232
- name : Test hls-explicit-record-fields-plugin test suite
233
- run : cabal test hls-explicit-record-fields-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-explicit-record-fields-plugin --test-options="$TEST_OPTS"
234
-
235
- # # version needs to be limited since the tests depend on cabal-fmt which only builds using specific ghc versions
236
- - if : matrix.test && matrix.ghc == '8.10.7'
237
- name : Test hls-cabal-fmt-plugin test suite
238
- run : cabal test hls-cabal-fmt-plugin --flag=isolateTests --test-options="$TEST_OPTS" || cabal test hls-cabal-fmt-plugin --flag=isolateTests --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-cabal-fmt-plugin --flag=isolateTests --test-options="$TEST_OPTS"
239
-
240
- - if : matrix.test
241
- name : Test hls-cabal-plugin test suite
242
- run : cabal test hls-cabal-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-cabal-plugin --test-options="$TEST_OPTS"
243
-
244
- - if : matrix.test
245
- name : Test hls-retrie-plugin test suite
246
- run : cabal test hls-retrie-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-retrie-plugin --test-options="$TEST_OPTS"
124
+ run : cabal test ${{ matrix.package }} --test-options="$TEST_OPTS"
247
125
248
126
test_post_job :
249
127
if : always()
0 commit comments