From 9d82f77b2fed1097fe9cea7f0fb10aacdcdb0bb2 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 5 Nov 2020 07:58:32 +0100 Subject: [PATCH 1/5] Fix stack.yaml extra-deps --- stack.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stack.yaml b/stack.yaml index 0eb07b430c..5a86a71f0c 100644 --- a/stack.yaml +++ b/stack.yaml @@ -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 @@ -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 From ce96b4cb924e99454f7857ea019f8658182d27e9 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 5 Nov 2020 08:00:09 +0100 Subject: [PATCH 2/5] Separete test suites to fix --rerun --- .circleci/config.yml | 13 +++++++------ .github/workflows/test.yml | 14 ++++++++++++-- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b55adc33e7..61a27f1669 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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" + 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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7be9777f66..c356c5c25e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -58,7 +58,8 @@ 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 @@ -66,5 +67,14 @@ jobs: # 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" \ No newline at end of file From 6e799121775eebaea268a3bebecdd4f54098606b Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 5 Nov 2020 08:00:45 +0100 Subject: [PATCH 3/5] Add default stack.yaml to ci --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 61a27f1669..eb3db2261d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -129,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 From d5d3bb093c6f775da26a8b349d390d4e79c286d9 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 5 Nov 2020 10:56:42 +0100 Subject: [PATCH 4/5] Retry nix build twice --- .circleci/config.yml | 2 +- .github/workflows/test.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index eb3db2261d..9fde188d87 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -190,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 }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c356c5c25e..9399aefcc6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -58,7 +58,7 @@ jobs: shell: bash # Retry it three times to workaround compiler segfaults in windows run: cabal build || cabal build || cabal build - + - name: Test func-test suite shell: bash env: @@ -77,4 +77,4 @@ jobs: # 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" \ No newline at end of file + run: cabal test wrapper-test --test-options="-j1" From 77b17d2f1a99d7cb7f7f67de3b93a9c95735787b Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 5 Nov 2020 11:42:48 +0100 Subject: [PATCH 5/5] Retry wrapper-test twice :facepalm: --- .circleci/config.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9fde188d87..f07ffb7ceb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -74,7 +74,7 @@ defaults: &defaults - 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" + 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: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9399aefcc6..d83adfde5e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -77,4 +77,4 @@ jobs: # 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" + run: cabal test wrapper-test --test-options="-j1" || cabal test wrapper-test --test-options="-j1" || cabal test wrapper-test --test-options="-j1"