ci: add check and format workflows

This commit is contained in:
ooks-io 2025-01-19 00:16:13 +11:00
parent 6f3ab0b8d3
commit 082722b2a8
3 changed files with 94 additions and 21 deletions

34
.github/workflows/format.yaml vendored Normal file
View file

@ -0,0 +1,34 @@
name: "Format Flake"
on:
push:
branches:
- main
paths-ignore:
- .github/**
- .gitignore
jobs:
alejandra:
name: Format with Alejandra
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Nix Magic Cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Format Flake
run: nix run nixpkgs#alejandra -- -c .
deadnix:
name: Dead Code Analysis with Deadnix
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Setup Deadnix
uses: cachix/cachix-action@v15
with:
name: deadnix
- uses: astro/deadnix-action@main