matrix-media-expanded/.github/workflows/ci.yaml
2022-05-04 17:09:06 -04:00

30 lines
770 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: Format check
run: |
nix develop -j auto -c treefmt --fail-on-change
- name: Hlint
run: |
nix develop -j auto -c hlint src
- name: Build
id: build
run: |
nix build -j auto