From 02ac095676d62eee6503038ab01c9db1395f04c3 Mon Sep 17 00:00:00 2001 From: jneira Date: Sat, 23 Oct 2021 23:07:06 +0200 Subject: [PATCH 01/17] Skip jobs with skip ci in pr data --- .github/workflows/test.yml | 62 ++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b8fda76503..6805d60197 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,6 +15,7 @@ jobs: outputs: should_skip: ${{ steps.skip_check.outputs.should_skip }} should_skip_ghcide: ${{ steps.skip_ghcide_check.outputs.should_skip }} + should_skip_pr: ${{ steps.skip_pr_check.outputs.should_skip }} steps: - id: skip_check uses: fkirc/skip-duplicate-actions@v3.4.0 @@ -26,6 +27,9 @@ jobs: uses: fkirc/skip-duplicate-actions@v3.4.0 with: paths_ignore: '["hls-test-utils/**", "plugins/**", "src/**", "exe/**", "test/**", "shake-bench/**"]' + - id: skip_pr_check + if: contains(github.event.pull_request.title,'[skip ci]') || contains(github.event.pull_request.body,'[skip ci]') + run: echo "::set-output name=should_skip::true" test: needs: pre_job @@ -67,50 +71,50 @@ jobs: ghc: '8.8.4' steps: - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' uses: actions/checkout@v2 with: submodules: true - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' uses: haskell/actions/setup@v1 with: ghc-version: ${{ matrix.ghc }} cabal-version: "3.4" - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' run: ./fmt.sh name: "HLint via ./fmt.sh" - - if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.os == 'windows-latest'}} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.os == 'windows-latest' name: Set some window specific things run: | echo "CABAL_STORE_DIR=$SYSTEMDRIVE\\SR" >> $GITHUB_ENV echo "CABAL_PKGS_DIR=~\\AppData\\cabal\\packages" >> $GITHUB_ENV - - if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.os != 'windows-latest'}} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.os != 'windows-latest' name: Set some linux/macOS specific things run: | echo "CABAL_STORE_DIR=~/.cabal/store" >> $GITHUB_ENV echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV - - name: Workaround for GHC 8.10.5 on macOS - if: matrix.os == 'macOS-latest' && matrix.ghc == '8.10.5' + - if: matrix.os == 'macOS-latest' && matrix.ghc == '8.10.5' + name: Workaround for GHC 8.10.5 on macOS run: | echo "# uninstalling CommandLineTools (see https://github.com/haskell/haskell-language-server/issues/1913#issuecomment-861667786)" sudo rm -rf /Library/Developer/CommandLineTools # Needs to be before Cache Cabal so the cache can detect changes to the modified cabal.project file - - if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.ghc == '9.0.1' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.ghc == '9.0.1' name: Use modified cabal.project for ghc9 run: cp cabal-ghc901.project cabal.project - - if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.ghc == '8.8.4' && matrix.os == 'windows-latest' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.ghc == '8.8.4' && matrix.os == 'windows-latest' name: Modify cabal.project to workaround segfaults for ghc-8.8.4 and windows run: | echo "package floskell" >> cabal.project echo " ghc-options: -O0" >> cabal.project - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' name: Cache Cabal uses: actions/cache@v2 env: @@ -125,11 +129,11 @@ jobs: v2-${{ runner.os }}-${{ matrix.ghc }}-build- v2-${{ runner.os }}-${{ matrix.ghc }} - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' run: cabal update # Need this to work around filepath length limits in Windows - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' name: Shorten binary names run: | sed -i.bak -e 's/haskell-language-server/hls/g' \ @@ -138,17 +142,17 @@ jobs: sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \ src/**/*.hs exe/*.hs - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' name: Build # Retry it three times to workaround compiler segfaults in windows run: cabal build || cabal build || cabal build - - if: ${{ needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_ghcide != 'true' && matrix.test }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && needs.pre_job.outputs.should_skip_ghcide != 'true' && matrix.test name: Test ghcide # 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" - - if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test && !(matrix.os == 'windows-latest' && matrix.ghc == '9.0.1')}} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test && !(matrix.os == 'windows-latest' && matrix.ghc == '9.0.1') name: Test func-test suite env: HLS_TEST_EXE: hls @@ -158,7 +162,7 @@ jobs: # instances to be spun up for the poor github actions runner to handle run: 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" - - if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test name: Test wrapper-test suite env: HLS_TEST_EXE: hls @@ -168,54 +172,54 @@ jobs: # 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" - - if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test && matrix.ghc != '9.0.1' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test && matrix.ghc != '9.0.1' name: Test hls-brittany-plugin run: cabal test hls-brittany-plugin --test-options="-j1 --rerun-update" || cabal test hls-brittany-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-brittany-plugin --test-options="-j1 --rerun" - - if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test && matrix.ghc != '9.0.1' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test && matrix.ghc != '9.0.1' name: Test hls-class-plugin run: cabal test hls-class-plugin --test-options="-j1 --rerun-update" || cabal test hls-class-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-class-plugin --test-options="-j1 --rerun" - - if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test name: Test hls-eval-plugin run: cabal test hls-eval-plugin --test-options="-j1 --rerun-update" || cabal test hls-eval-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-eval-plugin --test-options="-j1 --rerun" - - if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test name: Test hls-haddock-comments-plugin run: cabal test hls-haddock-comments-plugin --test-options="-j1 --rerun-update" || cabal test hls-haddock-comments-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-haddock-comments-plugin --test-options="-j1 --rerun" - - if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test name: Test hls-splice-plugin run: cabal test hls-splice-plugin --test-options="-j1 --rerun-update" || cabal test hls-splice-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-splice-plugin --test-options="-j1 --rerun" - - if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test && matrix.ghc != '9.0.1' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test name: Test hls-stylish-haskell-plugin run: cabal test hls-stylish-haskell-plugin --test-options="-j1 --rerun-update" || cabal test hls-stylish-haskell-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-stylish-haskell-plugin --test-options="-j1 --rerun" - - if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test name: Test hls-ormolu-plugin run: cabal test hls-ormolu-plugin --test-options="-j1 --rerun-update" || cabal test hls-ormolu-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-ormolu-plugin --test-options="-j1 --rerun" - - if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test name: Test hls-fourmolu-plugin run: cabal test hls-fourmolu-plugin --test-options="-j1 --rerun-update" || cabal test hls-fourmolu-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-fourmolu-plugin --test-options="-j1 --rerun" - - if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test && matrix.ghc != '9.0.1' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test && matrix.ghc != '9.0.1' name: Test hls-tactics-plugin test suite run: cabal test hls-tactics-plugin --test-options="-j1 --rerun-update" || cabal test hls-tactics-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-tactics-plugin --test-options="-j1 --rerun" - - if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test name: Test hls-refine-imports-plugin test suite run: cabal test hls-refine-imports-plugin --test-options="-j1 --rerun-update" || cabal test hls-refine-imports-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-refine-imports-plugin --test-options="-j1 --rerun" - - if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test}} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test name: Test hls-call-hierarchy-plugin test suite run: cabal test hls-call-hierarchy-plugin --test-options="-j1 --rerun-update" || cabal test hls-call-hierarchy-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-call-hierarchy-plugin --test-options="-j1 --rerun" - - if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test}} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test name: Test hls-rename-plugin test suite run: cabal test hls-rename-plugin --test-options="-j1 --rerun-update" || cabal test hls-rename-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-rename-plugin --test-options="-j1 --rerun" - - if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test}} + - if: ${{ needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test}} name: Test hls-hlint-plugin test suite run: cabal test hls-hlint-plugin --test-options="-j1 --rerun-update" || cabal test hls-hlint-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-hlint-plugin --test-options="-j1 --rerun" From e6855f5cd6910e26a00158fc44c10233adc26ee8 Mon Sep 17 00:00:00 2001 From: jneira Date: Sat, 23 Oct 2021 23:29:10 +0200 Subject: [PATCH 02/17] Skip other jobs --- .github/workflows/bench.yml | 46 +++++++++++++++++++++---------------- .github/workflows/nix.yml | 12 ++++++---- 2 files changed, 34 insertions(+), 24 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 52be788dc8..2175ee269e 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -10,12 +10,16 @@ jobs: runs-on: ubuntu-latest outputs: should_skip: ${{ steps.skip_check.outputs.should_skip }} + should_skip_pr: ${{ steps.skip_pr_check.outputs.should_skip }} steps: - id: skip_check uses: fkirc/skip-duplicate-actions@v3.4.0 with: cancel_others: true paths_ignore: '["**/docs/**", "**.md", "**/LICENSE", ".circleci/**", "install/**", "**.nix", "**/test/**", "flake.lock", "**/README.md", "FUNDING.yml"]' + - id: skip_pr_check + if: contains(github.event.pull_request.title,'[skip ci]') || contains(github.event.pull_request.body,'[skip ci]') + run: echo "::set-output name=should_skip::true" bench-init: needs: pre_job @@ -28,18 +32,20 @@ jobs: os: [ubuntu-latest] steps: - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' uses: actions/checkout@v2 - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' run: git fetch origin master # check the master branch for benchmarking - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' uses: haskell/actions/setup@v1 with: ghc-version: ${{ matrix.ghc }} cabal-version: '3.2' enable-stack: false - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' name: Cache Cabal uses: actions/cache@v2 with: @@ -52,38 +58,38 @@ jobs: v2-${{ runner.os }}-${{ matrix.ghc }}-bench- v2-${{ runner.os }}-${{ matrix.ghc }} - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' run: cabal update # max-backjumps is increased as a temporary solution # for dependency resolution failure - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' run: cabal configure --enable-benchmarks --max-backjumps 12000 - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' name: Build shell: bash run: cabal build ghcide:benchHist - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' name: Bench init shell: bash run: cabal bench ghcide:benchHist -j --benchmark-options="all-binaries" # tar is required to preserve file permissions # compression speeds up upload/download nicely - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' name: tar workspace shell: bash run: tar -czf workspace.tar.gz * .git - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' name: tar cabal run: | cd ~/.cabal tar -czf cabal.tar.gz * - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' name: Upload workspace uses: actions/upload-artifact@v2 with: @@ -91,7 +97,7 @@ jobs: retention-days: 1 path: workspace.tar.gz - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' name: Upload .cabal uses: actions/upload-artifact@v2 with: @@ -111,46 +117,46 @@ jobs: example: ['cabal', 'lsp-types'] steps: - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' uses: haskell/actions/setup@v1 with: ghc-version: ${{ matrix.ghc }} cabal-version: '3.2' enable-stack: false - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' name: Download cabal home uses: actions/download-artifact@v2 with: name: cabal-home path: . - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' name: Download workspace uses: actions/download-artifact@v2 with: name: workspace path: . - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' name: untar run: | mkdir -p ~/.cabal tar xzf workspace.tar.gz tar xzf cabal.tar.gz --directory ~/.cabal - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' name: Bench shell: bash run: cabal bench ghcide:benchHist -j --benchmark-options="${{ matrix.example }}" - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' name: Display results shell: bash run: | column -s, -t < ghcide/bench-results/unprofiled/${{ matrix.example }}/results.csv | tee ghcide/bench-results/unprofiled/${{ matrix.example }}/results.txt - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' name: Archive benchmarking artifacts uses: actions/upload-artifact@v2 with: @@ -161,7 +167,7 @@ jobs: ghcide/bench-results/**/*.svg ghcide/bench-results/**/*.eventlog.html - - if: ${{ needs.pre_job.outputs.should_skip != 'true' }} + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' name: Archive benchmark logs uses: actions/upload-artifact@v2 with: diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 005506946d..0df5a7f260 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -14,6 +14,7 @@ jobs: outputs: should_skip_develop: ${{ steps.skip_check.outputs.should_skip }} should_skip_build: ${{ steps.skip_check_no_nix.outputs.should_skip }} + should_skip_pr: ${{ steps.skip_pr_check.outputs.should_skip }} steps: - id: skip_check uses: fkirc/skip-duplicate-actions@master @@ -25,6 +26,9 @@ jobs: with: cancel_others: false paths: '["**.nix"]' + - id: skip_pr_check + if: contains(github.event.pull_request.title,'[skip ci]') || contains(github.event.pull_request.body,'[skip ci]') + run: echo "::set-output name=should_skip::true" # Enter the development shell and run `cabal build` develop: @@ -37,11 +41,11 @@ jobs: os: [ubuntu-latest, macOS-latest] steps: - - if: ${{ needs.pre_job.outputs.should_skip_develop != 'true' }} + - if: needs.pre_job.outputs.should_skip_develop != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' uses: actions/checkout@v2 with: submodules: true - - if: ${{ needs.pre_job.outputs.should_skip_develop != 'true' }} + - if: needs.pre_job.outputs.should_skip_develop != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' uses: cachix/install-nix-action@v13 with: install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install @@ -49,13 +53,13 @@ jobs: extra_nix_config: | experimental-features = nix-command flakes nix_path: nixpkgs=channel:nixos-unstable - - if: ${{ needs.pre_job.outputs.should_skip_develop != 'true' }} + - if: needs.pre_job.outputs.should_skip_develop != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' uses: cachix/cachix-action@v10 with: name: haskell-language-server # Disable pushing, we will do that in job `build` skipPush: true - - if: ${{ needs.pre_job.outputs.should_skip_develop != 'true' }} + - if: needs.pre_job.outputs.should_skip_develop != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' run: | nix develop --print-build-logs --command cabal update nix develop --print-build-logs --command cabal build From 36fedfe4173e99c7d8931ed9e367f96081e5fe44 Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 26 Oct 2021 13:21:26 +0200 Subject: [PATCH 03/17] Use post job to set workflow status --- .github/workflows/test.yml | 71 +++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 738ff8beea..f6158ff0e1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,6 +32,7 @@ jobs: run: echo "::set-output name=should_skip::true" test: + if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' needs: pre_job runs-on: ${{ matrix.os }} strategy: @@ -71,27 +72,24 @@ jobs: ghc: '8.8.4' steps: - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - uses: actions/checkout@v2 + - uses: actions/checkout@v2 with: submodules: true - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - uses: haskell/actions/setup@v1 + - uses: haskell/actions/setup@v1 with: ghc-version: ${{ matrix.ghc }} cabal-version: "3.4" - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - run: ./fmt.sh + - run: ./fmt.sh name: "HLint via ./fmt.sh" - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.os == 'windows-latest' + - if: matrix.os == 'windows-latest' name: Set some window specific things run: | echo "CABAL_STORE_DIR=$SYSTEMDRIVE\\SR" >> $GITHUB_ENV echo "CABAL_PKGS_DIR=~\\AppData\\cabal\\packages" >> $GITHUB_ENV - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.os != 'windows-latest' + - if: matrix.os != 'windows-latest' name: Set some linux/macOS specific things run: | echo "CABAL_STORE_DIR=~/.cabal/store" >> $GITHUB_ENV @@ -104,18 +102,17 @@ jobs: sudo rm -rf /Library/Developer/CommandLineTools # Needs to be before Cache Cabal so the cache can detect changes to the modified cabal.project file - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.ghc == '9.0.1' + - if: matrix.ghc == '9.0.1' name: Use modified cabal.project for ghc9 run: cp cabal-ghc901.project cabal.project - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.ghc == '8.8.4' && matrix.os == 'windows-latest' + - if: matrix.ghc == '8.8.4' && matrix.os == 'windows-latest' name: Modify cabal.project to workaround segfaults for ghc-8.8.4 and windows run: | echo "package floskell" >> cabal.project echo " ghc-options: -O0" >> cabal.project - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - name: Cache Cabal + - name: Cache Cabal uses: actions/cache@v2 env: cache-name: cache-cabal @@ -129,12 +126,10 @@ jobs: v2-${{ runner.os }}-${{ matrix.ghc }}-build- v2-${{ runner.os }}-${{ matrix.ghc }} - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - run: cabal update + - run: cabal update # Need this to work around filepath length limits in Windows - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - name: Shorten binary names + - name: Shorten binary names run: | sed -i.bak -e 's/haskell-language-server/hls/g' \ -e 's/haskell_language_server/hls/g' \ @@ -142,7 +137,6 @@ jobs: sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \ src/**/*.hs exe/*.hs - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' # this is only safe if the test environment is isolated - name: setup ide cache run: | @@ -152,17 +146,16 @@ jobs: rm -rf $XDG_CACHE_HOME/ghcide rm -rf $XDG_CACHE_HOME/hie-bios - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - name: Build + - name: Build # Retry it three times to workaround compiler segfaults in windows run: cabal build || cabal build || cabal build - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && needs.pre_job.outputs.should_skip_ghcide != 'true' && matrix.test + - if: needs.pre_job.outputs.should_skip_ghcide != 'true' && matrix.test name: Test ghcide # 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" - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test && !(matrix.os == 'windows-latest' && matrix.ghc == '9.0.1') + - if: matrix.test && !(matrix.os == 'windows-latest' && matrix.ghc == '9.0.1') name: Test func-test suite env: HLS_TEST_EXE: hls @@ -172,7 +165,7 @@ jobs: # instances to be spun up for the poor github actions runner to handle run: 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" - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test + - if: matrix.test name: Test wrapper-test suite env: HLS_TEST_EXE: hls @@ -182,54 +175,62 @@ jobs: # 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" - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test && matrix.ghc != '9.0.1' + - if: matrix.test && matrix.ghc != '9.0.1' name: Test hls-brittany-plugin run: cabal test hls-brittany-plugin --test-options="-j1 --rerun-update" || cabal test hls-brittany-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-brittany-plugin --test-options="-j1 --rerun" - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test && matrix.ghc != '9.0.1' + - if: matrix.test && matrix.ghc != '9.0.1' name: Test hls-class-plugin run: cabal test hls-class-plugin --test-options="-j1 --rerun-update" || cabal test hls-class-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-class-plugin --test-options="-j1 --rerun" - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test + - if: matrix.test name: Test hls-eval-plugin run: cabal test hls-eval-plugin --test-options="-j1 --rerun-update" || cabal test hls-eval-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-eval-plugin --test-options="-j1 --rerun" - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test + - if: matrix.test name: Test hls-haddock-comments-plugin run: cabal test hls-haddock-comments-plugin --test-options="-j1 --rerun-update" || cabal test hls-haddock-comments-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-haddock-comments-plugin --test-options="-j1 --rerun" - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test + - if: matrix.test name: Test hls-splice-plugin run: cabal test hls-splice-plugin --test-options="-j1 --rerun-update" || cabal test hls-splice-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-splice-plugin --test-options="-j1 --rerun" - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test + - if: matrix.test name: Test hls-stylish-haskell-plugin run: cabal test hls-stylish-haskell-plugin --test-options="-j1 --rerun-update" || cabal test hls-stylish-haskell-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-stylish-haskell-plugin --test-options="-j1 --rerun" - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test + - if: matrix.test name: Test hls-ormolu-plugin run: cabal test hls-ormolu-plugin --test-options="-j1 --rerun-update" || cabal test hls-ormolu-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-ormolu-plugin --test-options="-j1 --rerun" - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test + - if: matrix.test name: Test hls-fourmolu-plugin run: cabal test hls-fourmolu-plugin --test-options="-j1 --rerun-update" || cabal test hls-fourmolu-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-fourmolu-plugin --test-options="-j1 --rerun" - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test && matrix.ghc != '9.0.1' + - if: matrix.test && matrix.ghc != '9.0.1' name: Test hls-tactics-plugin test suite run: cabal test hls-tactics-plugin --test-options="-j1 --rerun-update" || cabal test hls-tactics-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-tactics-plugin --test-options="-j1 --rerun" - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test + - if: matrix.test name: Test hls-refine-imports-plugin test suite run: cabal test hls-refine-imports-plugin --test-options="-j1 --rerun-update" || cabal test hls-refine-imports-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-refine-imports-plugin --test-options="-j1 --rerun" - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test + - if: matrix.test name: Test hls-call-hierarchy-plugin test suite run: cabal test hls-call-hierarchy-plugin --test-options="-j1 --rerun-update" || cabal test hls-call-hierarchy-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-call-hierarchy-plugin --test-options="-j1 --rerun" - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test + - if: matrix.test name: Test hls-rename-plugin test suite run: cabal test hls-rename-plugin --test-options="-j1 --rerun-update" || cabal test hls-rename-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-rename-plugin --test-options="-j1 --rerun" - - if: ${{ needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && matrix.test}} + - if: matrix.test name: Test hls-hlint-plugin test suite run: cabal test hls-hlint-plugin --test-options="-j1 --rerun-update" || cabal test hls-hlint-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-hlint-plugin --test-options="-j1 --rerun" + + post_job: + if: always() + runs-on: ubuntu-latest + needs: [pre_job, test] + steps: + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && needs.test.status == 'failure' + run: exit 1 From 97f0d22a3319c9760dcbddcd257c4bbcc1b8ca6d Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 26 Oct 2021 13:42:25 +0200 Subject: [PATCH 04/17] Apply post_job trick to bench and nix --- .github/workflows/bench.yml | 75 ++++++++++++++++--------------------- .github/workflows/nix.yml | 25 ++++++++----- .github/workflows/test.yml | 2 +- 3 files changed, 48 insertions(+), 54 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 2175ee269e..8f84cac732 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -21,7 +21,8 @@ jobs: if: contains(github.event.pull_request.title,'[skip ci]') || contains(github.event.pull_request.body,'[skip ci]') run: echo "::set-output name=should_skip::true" - bench-init: + bench_init: + if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' needs: pre_job runs-on: ${{ matrix.os }} @@ -32,21 +33,17 @@ jobs: os: [ubuntu-latest] steps: - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - uses: actions/checkout@v2 + - uses: actions/checkout@v2 - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - run: git fetch origin master # check the master branch for benchmarking + - run: git fetch origin master # check the master branch for benchmarking - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - uses: haskell/actions/setup@v1 + - uses: haskell/actions/setup@v1 with: ghc-version: ${{ matrix.ghc }} cabal-version: '3.2' enable-stack: false - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - name: Cache Cabal + - name: Cache Cabal uses: actions/cache@v2 with: path: | @@ -58,55 +55,47 @@ jobs: v2-${{ runner.os }}-${{ matrix.ghc }}-bench- v2-${{ runner.os }}-${{ matrix.ghc }} - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - run: cabal update + - run: cabal update # max-backjumps is increased as a temporary solution # for dependency resolution failure - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - run: cabal configure --enable-benchmarks --max-backjumps 12000 + - run: cabal configure --enable-benchmarks --max-backjumps 12000 - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - name: Build + - name: Build shell: bash run: cabal build ghcide:benchHist - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - name: Bench init + - name: Bench init shell: bash run: cabal bench ghcide:benchHist -j --benchmark-options="all-binaries" # tar is required to preserve file permissions # compression speeds up upload/download nicely - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - name: tar workspace + - name: tar workspace shell: bash run: tar -czf workspace.tar.gz * .git - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - name: tar cabal + - name: tar cabal run: | cd ~/.cabal tar -czf cabal.tar.gz * - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - name: Upload workspace + - name: Upload workspace uses: actions/upload-artifact@v2 with: name: workspace retention-days: 1 path: workspace.tar.gz - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - name: Upload .cabal + - name: Upload .cabal uses: actions/upload-artifact@v2 with: name: cabal-home retention-days: 1 path: ~/.cabal/cabal.tar.gz - bench-example: - needs: [bench-init, pre_job] + bench_example: + needs: [bench_init, pre_job] runs-on: ${{ matrix.os }} strategy: @@ -117,47 +106,40 @@ jobs: example: ['cabal', 'lsp-types'] steps: - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - uses: haskell/actions/setup@v1 + - uses: haskell/actions/setup@v1 with: ghc-version: ${{ matrix.ghc }} cabal-version: '3.2' enable-stack: false - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - name: Download cabal home + - name: Download cabal home uses: actions/download-artifact@v2 with: name: cabal-home path: . - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - name: Download workspace + - name: Download workspace uses: actions/download-artifact@v2 with: name: workspace path: . - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - name: untar + - name: untar run: | mkdir -p ~/.cabal tar xzf workspace.tar.gz tar xzf cabal.tar.gz --directory ~/.cabal - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - name: Bench + - name: Bench shell: bash run: cabal bench ghcide:benchHist -j --benchmark-options="${{ matrix.example }}" - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - name: Display results + - name: Display results shell: bash run: | column -s, -t < ghcide/bench-results/unprofiled/${{ matrix.example }}/results.csv | tee ghcide/bench-results/unprofiled/${{ matrix.example }}/results.txt - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - name: Archive benchmarking artifacts + - name: Archive benchmarking artifacts uses: actions/upload-artifact@v2 with: name: bench-results-${{ runner.os }}-${{ matrix.ghc }} @@ -167,8 +149,7 @@ jobs: ghcide/bench-results/**/*.svg ghcide/bench-results/**/*.eventlog.html - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - name: Archive benchmark logs + - name: Archive benchmark logs uses: actions/upload-artifact@v2 with: name: bench-logs-${{ runner.os }}-${{ matrix.ghc }} @@ -176,3 +157,11 @@ jobs: ghcide/bench-results/**/*.log ghcide/bench-results/**/*.eventlog ghcide/bench-results/**/*.hp + + post_job: + if: always() + runs-on: ubuntu-latest + needs: [pre_job, bench_init, bench_example] + steps: + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && contains(needs.*.status, 'failure') + run: exit 1 diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 0df5a7f260..e807fccd3b 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -32,6 +32,7 @@ jobs: # Enter the development shell and run `cabal build` develop: + if: needs.pre_job.outputs.should_skip_develop != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' needs: pre_job runs-on: ${{ matrix.os }} @@ -41,26 +42,22 @@ jobs: os: [ubuntu-latest, macOS-latest] steps: - - if: needs.pre_job.outputs.should_skip_develop != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - uses: actions/checkout@v2 + - uses: actions/checkout@v2 with: submodules: true - - if: needs.pre_job.outputs.should_skip_develop != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - uses: cachix/install-nix-action@v13 + - uses: cachix/install-nix-action@v13 with: install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve' extra_nix_config: | experimental-features = nix-command flakes nix_path: nixpkgs=channel:nixos-unstable - - if: needs.pre_job.outputs.should_skip_develop != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - uses: cachix/cachix-action@v10 + - uses: cachix/cachix-action@v10 with: name: haskell-language-server # Disable pushing, we will do that in job `build` skipPush: true - - if: needs.pre_job.outputs.should_skip_develop != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' - run: | + - run: | nix develop --print-build-logs --command cabal update nix develop --print-build-logs --command cabal build @@ -70,10 +67,10 @@ jobs: # 2. Nix files are changed (runs on PR) build: needs: pre_job - runs-on: ${{ matrix.os }} + runs-on: matrix.os env: HAS_TOKEN: ${{ secrets.HLS_CACHIX_AUTH_TOKEN != '' }} - if: ${{ needs.pre_job.outputs.should_skip_build != 'true' || (github.repository_owner == 'haskell' && github.ref == 'refs/heads/master') }} + if: (needs.pre_job.outputs.should_skip_build != 'true' && needs.pre_job.outputs.should_skip_pr != 'true') || (github.repository_owner == 'haskell' && github.ref == 'refs/heads/master') strategy: fail-fast: false matrix: @@ -108,3 +105,11 @@ jobs: - name: Push binaries if: ${{ env.HAS_TOKEN == 'true' }} run: nix path-info --json | jq -r '.[].path' | cachix push haskell-language-server + + post_job: + if: always() + runs-on: ubuntu-latest + needs: [pre_job, develop, build] + steps: + - if: needs.pre_job.outputs.should_skip_develop != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && contains(needs.*.status, 'failure') + run: exit 1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f6158ff0e1..5e1725e23a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -232,5 +232,5 @@ jobs: runs-on: ubuntu-latest needs: [pre_job, test] steps: - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && needs.test.status == 'failure' + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && contains(needs.*.status, 'failure') run: exit 1 From 552e8b4bf0c4e510a02603e2f3154c137e986563 Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 26 Oct 2021 13:51:32 +0200 Subject: [PATCH 05/17] Explain why jobs are skipped --- .github/workflows/bench.yml | 4 +++- .github/workflows/nix.yml | 4 +++- .github/workflows/test.yml | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 8f84cac732..af4471f527 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -19,7 +19,9 @@ jobs: paths_ignore: '["**/docs/**", "**.md", "**/LICENSE", ".circleci/**", "install/**", "**.nix", "**/test/**", "flake.lock", "**/README.md", "FUNDING.yml"]' - id: skip_pr_check if: contains(github.event.pull_request.title,'[skip ci]') || contains(github.event.pull_request.body,'[skip ci]') - run: echo "::set-output name=should_skip::true" + run: | + echo "Skipping main jobs cause [skip ci] was found in the pull request title or body" + echo "::set-output name=should_skip::true" bench_init: if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index e807fccd3b..4d37b44c49 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -28,7 +28,9 @@ jobs: paths: '["**.nix"]' - id: skip_pr_check if: contains(github.event.pull_request.title,'[skip ci]') || contains(github.event.pull_request.body,'[skip ci]') - run: echo "::set-output name=should_skip::true" + run: | + echo "Skipping main jobs cause [skip ci] was found in the pull request title or body" + echo "::set-output name=should_skip::true" # Enter the development shell and run `cabal build` develop: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5e1725e23a..482d5d1e77 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,7 +29,9 @@ jobs: paths_ignore: '["hls-test-utils/**", "plugins/**", "src/**", "exe/**", "test/**", "shake-bench/**"]' - id: skip_pr_check if: contains(github.event.pull_request.title,'[skip ci]') || contains(github.event.pull_request.body,'[skip ci]') - run: echo "::set-output name=should_skip::true" + run: | + echo "Skipping main jobs cause [skip ci] was found in the pull request title or body" + echo "::set-output name=should_skip::true" test: if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' From 364a70369d7e5b1e8d36d64ed241e42afbe7f5c0 Mon Sep 17 00:00:00 2001 From: Javier Neira Date: Tue, 26 Oct 2021 18:11:17 +0200 Subject: [PATCH 06/17] echo jobs status --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 482d5d1e77..8aea998a7a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -234,5 +234,7 @@ jobs: runs-on: ubuntu-latest needs: [pre_job, test] steps: + - run: | + echo ${{ needs.*.status }} - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && contains(needs.*.status, 'failure') run: exit 1 From aeb35812392002cb730ebef767c31a19a003b47c Mon Sep 17 00:00:00 2001 From: Javier Neira Date: Tue, 26 Oct 2021 18:15:09 +0200 Subject: [PATCH 07/17] echo jobs status --- .github/workflows/nix.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 4d37b44c49..71e667e2b3 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -113,5 +113,8 @@ jobs: runs-on: ubuntu-latest needs: [pre_job, develop, build] steps: + + - run: | + echo ${{ needs.*.status }} - if: needs.pre_job.outputs.should_skip_develop != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && contains(needs.*.status, 'failure') run: exit 1 From 2e2c60aee12c2b8c361bed995358be627670d39a Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 26 Oct 2021 21:06:02 +0200 Subject: [PATCH 08/17] Correct failure check --- .github/workflows/bench.yml | 4 +++- .github/workflows/nix.yml | 5 ++--- .github/workflows/test.yml | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index af4471f527..9527188ae7 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -165,5 +165,7 @@ jobs: runs-on: ubuntu-latest needs: [pre_job, bench_init, bench_example] steps: - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && contains(needs.*.status, 'failure') + - run: | + echo "jobs info: ${{ toJSON(needs) }}" + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && contains(needs.*.result, 'failure') run: exit 1 diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 71e667e2b3..3b95f46750 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -113,8 +113,7 @@ jobs: runs-on: ubuntu-latest needs: [pre_job, develop, build] steps: - - run: | - echo ${{ needs.*.status }} - - if: needs.pre_job.outputs.should_skip_develop != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && contains(needs.*.status, 'failure') + echo "jobs info: ${{ toJSON(needs) }}" + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && contains(needs.*.result, 'failure') run: exit 1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8aea998a7a..56e0f2f1c2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -235,6 +235,6 @@ jobs: needs: [pre_job, test] steps: - run: | - echo ${{ needs.*.status }} - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && contains(needs.*.status, 'failure') + echo "jobs info: ${{ toJSON(needs) }}" + - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && contains(needs.*.result, 'failure') run: exit 1 From f289443b7b27b3b231cc34625e145a734bfb2eae Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 26 Oct 2021 22:31:46 +0200 Subject: [PATCH 09/17] Change post job conditions --- .github/workflows/bench.yml | 5 ++++- .github/workflows/nix.yml | 5 ++++- .github/workflows/test.yml | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 9527188ae7..6d8cae84fe 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -167,5 +167,8 @@ jobs: steps: - run: | echo "jobs info: ${{ toJSON(needs) }}" - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && contains(needs.*.result, 'failure') + - if: contains(needs.*.result, 'failure') run: exit 1 + - if: contains(needs.*.result, 'cancelled') + name: cancelling + uses: andymckay/cancel-action@0.2 diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 3b95f46750..99f6709eb7 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -115,5 +115,8 @@ jobs: steps: - run: | echo "jobs info: ${{ toJSON(needs) }}" - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && contains(needs.*.result, 'failure') + - if: contains(needs.*.result, 'failure') run: exit 1 + - if: contains(needs.*.result, 'cancelled') + name: cancelling + uses: andymckay/cancel-action@0.2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 56e0f2f1c2..55878dbbc9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -236,5 +236,8 @@ jobs: steps: - run: | echo "jobs info: ${{ toJSON(needs) }}" - - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' && contains(needs.*.result, 'failure') + - if: contains(needs.*.result, 'failure') run: exit 1 + - if: contains(needs.*.result, 'cancelled') + name: cancelling + uses: andymckay/cancel-action@0.2 From 60bb24c483e47e43cdfcec9491b7fdc1ce303a89 Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 27 Oct 2021 09:47:04 +0200 Subject: [PATCH 10/17] Remove manual skip ci --- .github/workflows/bench.yml | 8 +------- .github/workflows/nix.yml | 8 +------- .github/workflows/test.yml | 8 +------- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 6d8cae84fe..48930e1eb1 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -10,21 +10,15 @@ jobs: runs-on: ubuntu-latest outputs: should_skip: ${{ steps.skip_check.outputs.should_skip }} - should_skip_pr: ${{ steps.skip_pr_check.outputs.should_skip }} steps: - id: skip_check uses: fkirc/skip-duplicate-actions@v3.4.0 with: cancel_others: true paths_ignore: '["**/docs/**", "**.md", "**/LICENSE", ".circleci/**", "install/**", "**.nix", "**/test/**", "flake.lock", "**/README.md", "FUNDING.yml"]' - - id: skip_pr_check - if: contains(github.event.pull_request.title,'[skip ci]') || contains(github.event.pull_request.body,'[skip ci]') - run: | - echo "Skipping main jobs cause [skip ci] was found in the pull request title or body" - echo "::set-output name=should_skip::true" bench_init: - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' + if: needs.pre_job.outputs.should_skip != 'true' needs: pre_job runs-on: ${{ matrix.os }} diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 99f6709eb7..dce5f9083b 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -14,7 +14,6 @@ jobs: outputs: should_skip_develop: ${{ steps.skip_check.outputs.should_skip }} should_skip_build: ${{ steps.skip_check_no_nix.outputs.should_skip }} - should_skip_pr: ${{ steps.skip_pr_check.outputs.should_skip }} steps: - id: skip_check uses: fkirc/skip-duplicate-actions@master @@ -26,15 +25,10 @@ jobs: with: cancel_others: false paths: '["**.nix"]' - - id: skip_pr_check - if: contains(github.event.pull_request.title,'[skip ci]') || contains(github.event.pull_request.body,'[skip ci]') - run: | - echo "Skipping main jobs cause [skip ci] was found in the pull request title or body" - echo "::set-output name=should_skip::true" # Enter the development shell and run `cabal build` develop: - if: needs.pre_job.outputs.should_skip_develop != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' + if: needs.pre_job.outputs.should_skip_develop != 'true' needs: pre_job runs-on: ${{ matrix.os }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 55878dbbc9..8896fad381 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,6 @@ jobs: outputs: should_skip: ${{ steps.skip_check.outputs.should_skip }} should_skip_ghcide: ${{ steps.skip_ghcide_check.outputs.should_skip }} - should_skip_pr: ${{ steps.skip_pr_check.outputs.should_skip }} steps: - id: skip_check uses: fkirc/skip-duplicate-actions@v3.4.0 @@ -27,14 +26,9 @@ jobs: uses: fkirc/skip-duplicate-actions@v3.4.0 with: paths_ignore: '["hls-test-utils/**", "plugins/**", "src/**", "exe/**", "test/**", "shake-bench/**"]' - - id: skip_pr_check - if: contains(github.event.pull_request.title,'[skip ci]') || contains(github.event.pull_request.body,'[skip ci]') - run: | - echo "Skipping main jobs cause [skip ci] was found in the pull request title or body" - echo "::set-output name=should_skip::true" test: - if: needs.pre_job.outputs.should_skip != 'true' && needs.pre_job.outputs.should_skip_pr != 'true' + if: needs.pre_job.outputs.should_skip != 'true' needs: pre_job runs-on: ${{ matrix.os }} strategy: From bbec83b46e070ef496e4fbf802fd3c9661dc73a5 Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 27 Oct 2021 09:49:04 +0200 Subject: [PATCH 11/17] Change label to skip circleci --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0ce6ca2740..8149333503 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,7 +16,7 @@ defaults: &defaults keys: - v4-stack-cache-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }} - # Looking for the string [skip ci] in all the json returned by https://docs.github.com/en/rest/reference/pulls#get-a-pull-request + # Looking for the string [skip circleci] in all the json returned by https://docs.github.com/en/rest/reference/pulls#get-a-pull-request - run: name: Skip ci setup command: | @@ -26,7 +26,7 @@ defaults: &defaults PULL_REQUEST_URL=${CIRCLE_PULL_REQUEST/github.com/api.github.com/repos} PULL_REQUEST_URL=${PULL_REQUEST_URL/pull/pulls} echo "PULL_REQUEST_URL: $PULL_REQUEST_URL" - SKIP_CI=$(curl $PULL_REQUEST_URL | grep -o "\\[skip ci\\]") + SKIP_CI=$(curl $PULL_REQUEST_URL | grep -o "\\[skip circleci\\]") echo "SKIP_CI: $SKIP_CI" fi echo "export SKIP_CI=$SKIP_CI" >> $BASH_ENV From 3cb254f2188779f7a8e990359ad4121e03133427 Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 27 Oct 2021 10:43:10 +0200 Subject: [PATCH 12/17] Delete setup cache ide step --- .github/workflows/test.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8896fad381..6a1125b678 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -133,15 +133,6 @@ jobs: sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \ src/**/*.hs exe/*.hs - # this is only safe if the test environment is isolated - - name: setup ide cache - run: | - export XDG_CACHE_HOME=$RUNNER_TEMP/cache - rm -rf ~/.cache/ghcide - rm -rf ~/.cache/hie-bios - rm -rf $XDG_CACHE_HOME/ghcide - rm -rf $XDG_CACHE_HOME/hie-bios - - name: Build # Retry it three times to workaround compiler segfaults in windows run: cabal build || cabal build || cabal build From 8e97692d79f6f38a02b4881f61aae026dc4718ce Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 27 Oct 2021 13:52:21 +0200 Subject: [PATCH 13/17] Skip circle ci when skipping gh --- .github/workflows/test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6a1125b678..7817d7ebc5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,6 +26,11 @@ jobs: uses: fkirc/skip-duplicate-actions@v3.4.0 with: paths_ignore: '["hls-test-utils/**", "plugins/**", "src/**", "exe/**", "test/**", "shake-bench/**"]' + - if: steps.skip_check.outputs.should_skip == 'true' + name: Skip circleci + uses: marocchino/sticky-pull-request-comment@v2 + with: + message: We are gonna [skip circleci] test: if: needs.pre_job.outputs.should_skip != 'true' From ac8a9030f269953b407fba15f90ca4bee5ecf008 Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 27 Oct 2021 13:57:25 +0200 Subject: [PATCH 14/17] No skip circleci if its config change --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7817d7ebc5..973d901995 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,7 @@ jobs: uses: fkirc/skip-duplicate-actions@v3.4.0 with: cancel_others: true - paths_ignore: '["**/docs/**", "**.md", "**/LICENSE", ".circleci/**", "install/**", "**.nix", "flake.lock", "**/README.md", "FUNDING.yml"]' + paths_ignore: '["**/docs/**", "**.md", "**/LICENSE", "install/**", "**.nix", "flake.lock", "**/README.md", "FUNDING.yml"]' # If we only change ghcide downstream packages we have not test ghcide itself - id: skip_ghcide_check uses: fkirc/skip-duplicate-actions@v3.4.0 From 1afb41557436636c87509cfdb18ee80b7dff0b46 Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 27 Oct 2021 14:11:23 +0200 Subject: [PATCH 15/17] Look for skip label in comments as well --- .circleci/config.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8149333503..ed50e17679 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -27,6 +27,11 @@ defaults: &defaults PULL_REQUEST_URL=${PULL_REQUEST_URL/pull/pulls} echo "PULL_REQUEST_URL: $PULL_REQUEST_URL" SKIP_CI=$(curl $PULL_REQUEST_URL | grep -o "\\[skip circleci\\]") + if [[ -z "$SKIP_CI" ]]; then + PULL_REQUEST_COMMENTS_URL=${PULL_REQUEST_URL/pulls/issues}/comments + echo "PULL_REQUEST_COMMENTS_URL: $PULL_REQUEST_COMMENTS_URL" + SKIP_CI=$(curl $PULL_REQUEST_COMMENTS_URL | grep -o "\\[skip circleci\\]") + fi echo "SKIP_CI: $SKIP_CI" fi echo "export SKIP_CI=$SKIP_CI" >> $BASH_ENV From f51cbc49004f2650186f099057902cb3b7522068 Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 27 Oct 2021 20:08:20 +0200 Subject: [PATCH 16/17] Add missing condition --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 55878dbbc9..87add11f6b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -197,7 +197,7 @@ jobs: name: Test hls-splice-plugin run: cabal test hls-splice-plugin --test-options="-j1 --rerun-update" || cabal test hls-splice-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-splice-plugin --test-options="-j1 --rerun" - - if: matrix.test + - if: matrix.test && matrix.ghc != '9.0.1' name: Test hls-stylish-haskell-plugin run: cabal test hls-stylish-haskell-plugin --test-options="-j1 --rerun-update" || cabal test hls-stylish-haskell-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-stylish-haskell-plugin --test-options="-j1 --rerun" From 952dd0d6ea12a9ec4050f27f907cb73f5a8a04e5 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 28 Oct 2021 07:40:27 +0200 Subject: [PATCH 17/17] Use a explicit github token --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2241f20502..70145d7851 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,6 +30,7 @@ jobs: name: Skip circleci uses: marocchino/sticky-pull-request-comment@v2 with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} message: We are gonna [skip circleci] test: