Skip to content

Commit

Permalink
Combine test and nix CI scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
pepeiborra committed Dec 29, 2020
1 parent a48a910 commit 8544fc0
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 253 deletions.
1 change: 0 additions & 1 deletion .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@ jobs:
- uses: cachix/cachix-action@v8
with:
name: haskell-language-server
extraPullNames: haskell-ghcide
authToken: '${{ secrets.HLS_CACHIX_AUTH_TOKEN }}'
- run: nix-shell --argstr compiler ${{ matrix.ghc }} --run "cabal update && cabal build"
16 changes: 16 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
matrix:
ghc: ["8.10.2", "8.10.1", "8.8.4", "8.8.3", "8.8.2", "8.6.5", "8.6.4"]
os: [ubuntu-latest, macOS-latest, windows-latest]
ghc-lib: [false]
exclude:
- os: windows-latest
ghc: "8.10.2" # broken due to https://gitlab.haskell.org/ghc/ghc/-/issues/18550
Expand All @@ -21,6 +22,10 @@ jobs:
include:
- os: windows-latest
ghc: "8.10.2.2" # only available for windows and choco
# one ghc-lib build
- os: ubuntu-latest
ghc: '8.10.1'
ghc-lib: true

steps:
- uses: actions/checkout@v2
Expand All @@ -32,6 +37,9 @@ jobs:
cabal-version: "3.2"
enable-stack: true

- run: ./fmt.sh
name: "HLint via ./fmt.sh"

- name: Cache Cabal
uses: actions/cache@v2
env:
Expand Down Expand Up @@ -62,6 +70,7 @@ jobs:
run: cabal build || cabal build || cabal build

- name: Test func-test suite
if: ${{ !matrix.ghc-lib }}
shell: bash
env:
HLS_TEST_EXE: hls
Expand All @@ -72,6 +81,7 @@ jobs:
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"

- name: Test wrapper-test suite
if: ${{ !matrix.ghc-lib }}
shell: bash
env:
HLS_TEST_EXE: hls
Expand All @@ -80,3 +90,9 @@ jobs:
# all functional test cases simultaneously which causes way too many hls
# instances to be spun up for the poor github actions runner to handle
run: cabal test wrapper-test --test-options="-j1" || cabal test wrapper-test --test-options="-j1" || cabal test wrapper-test --test-options="-j1"

- name: Test ghcide
if: ${{ !matrix.ghc-lib }}
shell: bash
# run the tests without parallelism to avoid running out of memory
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"
131 changes: 0 additions & 131 deletions .hlint.yaml

This file was deleted.

3 changes: 3 additions & 0 deletions fmt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
set -eou pipefail
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 --hint=ghcide/.hlint.yaml
23 changes: 0 additions & 23 deletions ghcide/.github/workflows/nix.yml

This file was deleted.

95 changes: 0 additions & 95 deletions ghcide/.github/workflows/test.yml

This file was deleted.

3 changes: 0 additions & 3 deletions ghcide/fmt.sh

This file was deleted.

0 comments on commit 8544fc0

Please sign in to comment.