2020-06-05 05:16:39 +00:00
|
|
|
name: CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
2020-12-13 13:15:58 +00:00
|
|
|
nix_parsing:
|
2020-06-05 05:16:39 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2020-11-17 17:09:14 +00:00
|
|
|
- uses: cachix/install-nix-action@v12
|
2020-12-13 13:15:58 +00:00
|
|
|
- name: Check Nix parsing
|
2020-06-05 05:16:39 +00:00
|
|
|
run: |
|
|
|
|
find . -name "*.nix" -exec nix-instantiate --parse --quiet {} >/dev/null +
|
2020-12-13 13:15:58 +00:00
|
|
|
nix_formatting:
|
2020-06-05 05:16:39 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2020-11-17 17:09:14 +00:00
|
|
|
- uses: cachix/install-nix-action@v12
|
|
|
|
with:
|
|
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
2020-12-13 13:15:58 +00:00
|
|
|
- name: Check Nix formatting
|
2020-06-05 05:16:39 +00:00
|
|
|
run: |
|
2021-11-13 13:37:18 +00:00
|
|
|
nix-shell -p nixpkgs-fmt --run "nixpkgs-fmt --check ."
|
2020-12-13 13:15:58 +00:00
|
|
|
shell_formatting:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: cachix/install-nix-action@v12
|
|
|
|
with:
|
|
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
|
|
- name: Check shell script formatting
|
|
|
|
run: |
|
2021-11-13 13:37:18 +00:00
|
|
|
find . -name "*.*sh" -exec nix-shell -p shfmt --run "shfmt -i 4 -d {}" \;
|
2020-12-13 13:15:58 +00:00
|
|
|
shell_error_checking:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: cachix/install-nix-action@v12
|
|
|
|
with:
|
|
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
|
|
- name: Check for shell script errors
|
|
|
|
run: |
|
2021-11-13 13:37:18 +00:00
|
|
|
find . -name "*.*sh" -exec nix-shell -p shellcheck --run "shellcheck {}" \;
|