-
Notifications
You must be signed in to change notification settings - Fork 15
46 lines (44 loc) · 1.62 KB
/
hls.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: "Haskell Language Server works"
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
test-hls-works:
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: Cachix install Nix
uses: cachix/install-nix-action@v18
with:
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 --version | grep -oE '[^ ]+$')" >> $GITHUB_OUTPUT
id: ghc
- name: Cache hie-bios and ghcide
uses: actions/cache@v3
with:
path: |
/home/runner/.cache
key: hls-cache-${{ runner.os }}-${{ steps.ghc.outputs.VERSION }}-${{ hashFiles('**/cabal.project.freeze') }}-${{ hashFiles('**/*.cabal', '**/cabal.project') }}
restore-keys: |
hls-cache-${{ runner.os }}-${{ steps.ghc.outputs.VERSION }}-${{ hashFiles('**/cabal.project.freeze') }}-
- name: Test HLS works
run: haskell-language-server