mirror of
https://github.com/nix-community/impermanence
synced 2024-11-12 22:57:11 +00:00
4269cf2fbb
Since the release of Nix 2.4, the ci pipeline is broken, as the syntax and behavior of nix run changed. The command is also considered experimental. Switch to using nix-shell instead.
41 lines
1.3 KiB
YAML
41 lines
1.3 KiB
YAML
name: CI
|
|
on: [push, pull_request]
|
|
jobs:
|
|
nix_parsing:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: cachix/install-nix-action@v12
|
|
- name: Check Nix parsing
|
|
run: |
|
|
find . -name "*.nix" -exec nix-instantiate --parse --quiet {} >/dev/null +
|
|
nix_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 Nix formatting
|
|
run: |
|
|
nix-shell -p nixpkgs-fmt --run "nixpkgs-fmt --check ."
|
|
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: |
|
|
find . -name "*.*sh" -exec nix-shell -p shfmt --run "shfmt -i 4 -d {}" \;
|
|
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: |
|
|
find . -name "*.*sh" -exec nix-shell -p shellcheck --run "shellcheck {}" \;
|