Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Haskell Language Server check to CI #798

Merged
merged 4 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/hls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "Haskell Language Server works"
on:
merge_group:
pull_request:
push:
branches:
- main

permissions:
contents: read

jobs:

test-hls-works:
env:
# Modify this value to "invalidate" the cache.
HLS_CACHE_VERSION: "2024-06-25"

runs-on: ubuntu-latest
timeout-minutes: 60
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/.local/state/cabal
.ghc.environment.x86_64-linux-9.8.2
dist-newstyle
key: hls-cache-${{ env.HLS_CACHE_VERSION }}-${{ runner.os }}-${{ steps.ghc.outputs.VERSION }}-${{ hashFiles('**/cabal.project.freeze') }}-${{ hashFiles('**/*.cabal', '**/cabal.project') }}
restore-keys: |
hls-cache-${{ env.HLS_CACHE_VERSION }}-${{ runner.os }}-${{ steps.ghc.outputs.VERSION }}-${{ hashFiles('**/cabal.project.freeze') }}-
- name: Test HLS works
run: haskell-language-server
1 change: 1 addition & 0 deletions cardano-cli/cardano-cli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ library
Cardano.CLI.EraBased.Run.TextView
Cardano.CLI.EraBased.Run.Transaction
Cardano.CLI.Helpers
Cardano.CLI.IO.Compat
Cardano.CLI.IO.Lazy
Cardano.CLI.Json.Friendly
Cardano.CLI.Legacy.Commands
Expand Down
Loading