Skip to content

Commit 5b40dcb

Browse files
committed
Combine test and nix CI scripts
1 parent 59568b3 commit 5b40dcb

File tree

5 files changed

+17
-120
lines changed

5 files changed

+17
-120
lines changed

.github/workflows/nix.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,5 @@ jobs:
2121
- uses: cachix/cachix-action@v8
2222
with:
2323
name: haskell-language-server
24-
extraPullNames: haskell-ghcide
2524
authToken: '${{ secrets.HLS_CACHIX_AUTH_TOKEN }}'
2625
- run: nix-shell --argstr compiler ${{ matrix.ghc }} --run "cabal update && cabal build"

.github/workflows/test.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
matrix:
1010
ghc: ["8.10.2", "8.10.1", "8.8.4", "8.8.3", "8.8.2", "8.6.5", "8.6.4"]
1111
os: [ubuntu-latest, macOS-latest, windows-latest]
12+
ghc-lib: [false]
1213
exclude:
1314
- os: windows-latest
1415
ghc: "8.10.2" # broken due to https://gitlab.haskell.org/ghc/ghc/-/issues/18550
@@ -21,6 +22,10 @@ jobs:
2122
include:
2223
- os: windows-latest
2324
ghc: "8.10.2.2" # only available for windows and choco
25+
# one ghc-lib build
26+
- os: ubuntu-latest
27+
ghc: '8.10.1'
28+
ghc-lib: true
2429

2530
steps:
2631
- uses: actions/checkout@v2
@@ -32,6 +37,9 @@ jobs:
3237
cabal-version: "3.2"
3338
enable-stack: true
3439

40+
- run: ./fmt.sh
41+
name: "HLint via ./fmt.sh"
42+
3543
- name: Cache Cabal
3644
uses: actions/cache@v2
3745
env:
@@ -62,6 +70,7 @@ jobs:
6270
run: cabal build || cabal build || cabal build
6371

6472
- name: Test func-test suite
73+
if: ${{ !matrix.ghc-lib }}
6574
shell: bash
6675
env:
6776
HLS_TEST_EXE: hls
@@ -72,6 +81,7 @@ jobs:
7281
run: cabal test func-test --test-options="-j1 --rerun-update" || cabal test func-test --test-options="-j1 --rerun --rerun-update" || cabal test func-test --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test func-test --test-options="-j1 --rerun"
7382

7483
- name: Test wrapper-test suite
84+
if: ${{ !matrix.ghc-lib }}
7585
shell: bash
7686
env:
7787
HLS_TEST_EXE: hls
@@ -80,3 +90,9 @@ jobs:
8090
# all functional test cases simultaneously which causes way too many hls
8191
# instances to be spun up for the poor github actions runner to handle
8292
run: cabal test wrapper-test --test-options="-j1" || cabal test wrapper-test --test-options="-j1" || cabal test wrapper-test --test-options="-j1"
93+
94+
- name: Test ghcide
95+
if: ${{ !matrix.ghc-lib }}
96+
shell: bash
97+
# run the tests without parallelism to avoid running out of memory
98+
run: cabal test ghcide --test-options="-j1 --rerun-update" || cabal test ghcide --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test ghcide --test-options="-j1 --rerun"

ghcide/fmt.sh renamed to fmt.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env bash
22
set -eou pipefail
3-
curl -sSL https://raw.github.com/ndmitchell/hlint/master/misc/run.sh | sh -s src exe bench shake-bench/src test/exe --with-group=extra
3+
curl -sSL https://raw.github.com/ndmitchell/hlint/master/misc/run.sh | sh -s ghcide/src ghcide/exe ghcide/bench shake-bench/src ghcide/test/exe --with-group=extra

ghcide/.github/workflows/nix.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

ghcide/.github/workflows/test.yml

Lines changed: 0 additions & 95 deletions
This file was deleted.

0 commit comments

Comments
 (0)