ci: add workflow for coding style linting

This commit is contained in:
Tobias Happ 2022-09-03 17:09:54 +02:00
parent b5d055df01
commit 241632822a

23
.github/workflows/lints.yml vendored Normal file
View file

@ -0,0 +1,23 @@
name: Run lints
on:
pull_request:
push:
jobs:
cachix:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install nix
uses: cachix/install-nix-action@v17
with:
nix_path: nixpkgs=channel:nixos-22.05
extra_nix_config: "experimental-features = nix-command flakes"
- name: Run formatter
run: nix fmt -- --check .
- name: Run statix
run: nix run nixpkgs#statix -- check