matrix-media-expanded/.github/workflows/ci.yaml
Sridhar Ratnakumar 5cfb230f15
Add a flake check for HLS (#47)
Also use check-flake for .#check package.

Deal with network access by disabling sandbox, and excluding in garnix.
2022-08-28 18:50:08 -04:00

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