ci: add formatting check (#30)
This will help enforce a consistent coding style. The formatter used is `nixpkgs-fmt`.
This commit is contained in:
parent
7a9b6b359e
commit
a8981723bb
1 changed files with 18 additions and 0 deletions
18
.github/workflows/ci.yml
vendored
Normal file
18
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
- push
|
||||||
|
- pull_request
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: cachix/install-nix-action@v20
|
||||||
|
with:
|
||||||
|
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Run formatter
|
||||||
|
run: nix run nixpkgs#nixpkgs-fmt .
|
||||||
|
- name: Check for changes
|
||||||
|
run: git diff --color=always --exit-code
|
Loading…
Reference in a new issue