5cfb230f15
Also use check-flake for .#check package. Deal with network access by disabling sandbox, and excluding in garnix.
33 lines
978 B
YAML
33 lines
978 B
YAML
name: "CI"
|
|
on:
|
|
# Run only when pushing to master branch, and making PRs
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: cachix/install-nix-action@v17
|
|
with:
|
|
extra_nix_config: |
|
|
experimental-features = nix-command flakes
|
|
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
|
- name: Cache Nix dependencies
|
|
run: |
|
|
nix develop -j 4 -c echo
|
|
- name: Flake checks
|
|
run: |
|
|
# Sandbox must be disabled due to HLS,
|
|
# https://github.com/haskell/haskell-language-server/issues/3128
|
|
nix --option sandbox false build .#check --no-link -L
|
|
# TODO: Remove after https://github.com/srid/haskell-flake/issues/19
|
|
- name: Hlint
|
|
run: |
|
|
nix develop -j auto -c hlint src
|
|
- name: Build
|
|
id: build
|
|
run: |
|
|
nix build -j auto -L
|