ci: add check and format workflows
This commit is contained in:
parent
6f3ab0b8d3
commit
082722b2a8
3 changed files with 94 additions and 21 deletions
34
.github/workflows/format.yaml
vendored
Normal file
34
.github/workflows/format.yaml
vendored
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue