Skip to content

Commit

Permalink
Merge pull request #570 from jneira/fix-rerun
Browse files Browse the repository at this point in the history
Fix tasty rerun
  • Loading branch information
jneira authored Nov 5, 2020
2 parents d0f02b5 + 77b17d2 commit 05ee76d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 16 deletions.
23 changes: 12 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,21 @@ defaults: &defaults
no_output_timeout: 120m

- run:
name: Test haskell-language-server
name: Test haskell-language-server func-test suite
# Tasty by default will run all the tests in parallel. Which should
# work ok, but given that these CircleCI runners aren't the beefiest
# machine can cause some flakiness. So pass -j1 to Tasty (NOT Stack) to
# tell it to go slow and steady.
command: stack --stack-yaml=${STACK_FILE} test haskell-language-server --dump-logs --test-arguments="-j1 --rerun-update" || stack --stack-yaml=${STACK_FILE} test haskell-language-server --dump-logs --test-arguments="-j1 --rerun" || stack --stack-yaml=${STACK_FILE} test haskell-language-server --dump-logs --test-arguments="-j1 --rerun"
command: stack --stack-yaml=${STACK_FILE} test haskell-language-server:func-test --dump-logs --test-arguments="-j1 --rerun-update" || stack --stack-yaml=${STACK_FILE} test haskell-language-server:func-test --dump-logs --test-arguments="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true stack --stack-yaml=${STACK_FILE} test haskell-language-server:func-test --dump-logs --test-arguments="-j1 --rerun"
no_output_timeout: 120m

- run:
name: Test haskell-language-server wrapper-test suite
command: stack --stack-yaml=${STACK_FILE} test haskell-language-server:wrapper-test --dump-logs --test-arguments="-j1" || stack --stack-yaml=${STACK_FILE} test haskell-language-server:wrapper-test --dump-logs --test-arguments="-j1"
no_output_timeout: 30m

- run:
name: Test hls-tactics-plugin
# Tasty by default will run all the tests in parallel. Which should
# work ok, but given that these CircleCI runners aren't the beefiest
# machine can cause some flakiness. So pass -j1 to Tasty (NOT Stack) to
# tell it to go slow and steady.
command: stack --stack-yaml=${STACK_FILE} test hls-tactics-plugin:test:tests --dump-logs --test-arguments="-j1"
no_output_timeout: 30m

Expand Down Expand Up @@ -128,10 +129,10 @@ jobs:
- STACK_FILE: "stack-8.10.2.yaml"
<<: *defaults

# ghc-nightly:
# environment:
# - STACK_FILE: "stack.yaml"
# <<: *defaults
ghc-nightly:
environment:
- STACK_FILE: "stack.yaml"
<<: *defaults

cabal:
working_directory: ~/build
Expand Down Expand Up @@ -189,7 +190,7 @@ jobs:
- cabal-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}
- run:
name: Build
command: nix-shell -j4 --run "cabal new-update && cabal new-build -j1 --enable-tests"
command: nix-shell -j4 --run "cabal new-update && (cabal new-build -j1 --enable-tests || cabal new-build -j1 --enable-tests) "
no_output_timeout: 30m
- save_cache:
key: cabal-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,23 @@ jobs:
shell: bash
# Retry it three times to workaround compiler segfaults in windows
run: cabal build || cabal build || cabal build
- name: Test

- name: Test func-test suite
shell: bash
env:
HLS_TEST_EXE: hls
HLS_WRAPPER_TEST_EXE: hls-wrapper
# run the tests without parallelism, otherwise tasty will attempt to run
# 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 --test-options="-j1 --rerun-update" || cabal test --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test --test-options="-j1 --rerun"
run: cabal test func-test --test-options="-j1 --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
shell: bash
env:
HLS_TEST_EXE: hls
HLS_WRAPPER_TEST_EXE: hls-wrapper
# run the tests without parallelism, otherwise tasty will attempt to run
# 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"
6 changes: 3 additions & 3 deletions stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ extra-deps:
# - ghcide-0.1.0
- ghc-check-0.5.0.1
- ghc-exactprint-0.6.3.2
- ghc-lib-8.10.2.20200808
- ghc-lib-parser-8.10.2.20200808
- ghc-lib-8.10.2.20200916
- ghc-lib-parser-8.10.2.20200916
- ghc-lib-parser-ex-8.10.0.16
- ghc-source-gen-0.4.0.0
- haddock-api-2.22.0@rev:1
Expand All @@ -42,7 +42,7 @@ extra-deps:
- HsYAML-0.2.1.0@rev:1
- HsYAML-aeson-0.2.0.0@rev:2
- implicit-hie-cradle-0.2.0.1
- implicit-hie-0.1.1.0
- implicit-hie-0.1.2.0
- indexed-profunctors-0.1
- lens-4.18
- lsp-test-0.11.0.6
Expand Down

0 comments on commit 05ee76d

Please # to comment.