Skip to content

Add Haskell Language Server check to CI #26

Add Haskell Language Server check to CI

Add Haskell Language Server check to CI #26

Workflow file for this run

name: "Haskell Language Server works"
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
test-hls-works:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Install Nix with good defaults
uses: input-output-hk/install-nix-action@v20
with:
extra_nix_config: |
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
substituters = https://cache.iog.io/ https://cache.nixos.org/
nix_path: nixpkgs=channel:nixos-unstable
- name: Open nix environment
uses: rrbutani/use-nix-shell-action@v1
- name: Update dependencies
run: cabal update; cabal freeze
- name: Obtain GHC version
run: |
echo "VERSION=$(ghc --numeric-version)" >> $GITHUB_OUTPUT
id: ghc
- name: HLS caching
uses: actions/cache@v4
with:
path: |
/home/runner/.cache/hie-bios
/home/runner/.cache/ghcide
/home/runner/.cache/cabal
dist-newstyle
key: hls-cache-${{ env.CABAL_CACHE_VERSION }}-${{ runner.os }}-${{ steps.ghc.outputs.VERSION }}-${{ hashFiles('**/cabal.project.freeze') }}-${{ hashFiles('**/*.cabal', '**/cabal.project') }}
restore-keys: |
hls-cache-${{ env.CABAL_CACHE_VERSION }}-${{ runner.os }}-${{ steps.ghc.outputs.VERSION }}-${{ hashFiles('**/cabal.project.freeze') }}-
- name: Snapshot file list
run: find / > /tmp/before.txt
- name: Test HLS works
run: haskell-language-server
- name: Check files modified
run: find / > /tmp/after.txt
run: diff /tmp/before.txt /tmp/after.txt

Check failure on line 49 in .github/workflows/hls.yml

View workflow run for this annotation

GitHub Actions / Haskell Language Server works

Invalid workflow file

The workflow is not valid. .github/workflows/hls.yml (Line: 49, Col: 9): 'run' is already defined