ci: more stuff

This commit is contained in:
Barrett Ruth 2026-03-03 01:30:55 -05:00
parent cd9f745ace
commit 4968e854e6
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
3 changed files with 47 additions and 2 deletions

View file

@ -11,6 +11,8 @@ jobs:
runs-on: ubuntu-latest
outputs:
nix: ${{ steps.changes.outputs.nix }}
lua: ${{ steps.changes.outputs.lua }}
prettier: ${{ steps.changes.outputs.prettier }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
@ -21,6 +23,15 @@ jobs:
- '**/*.nix'
- 'flake.lock'
- 'flake.nix'
lua:
- '**/*.lua'
prettier:
- '**/*.json'
- '**/*.yaml'
- '**/*.yml'
- '**/*.md'
- '**/*.toml'
- '**/*.css'
nix-format:
name: Nix Format Check
@ -51,3 +62,33 @@ jobs:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v31
- run: nix develop --command statix check .
lua-format:
name: Lua Format Check
runs-on: ubuntu-latest
needs: changes
if: ${{ needs.changes.outputs.lua == 'true' }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v31
- run: nix develop --command stylua --check .
lua-lint:
name: Lua Lint Check
runs-on: ubuntu-latest
needs: changes
if: ${{ needs.changes.outputs.lua == 'true' }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v31
- run: nix develop --command selene --display-style quiet .
prettier:
name: Prettier Format Check
runs-on: ubuntu-latest
needs: changes
if: ${{ needs.changes.outputs.prettier == 'true' }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v31
- run: nix develop --command prettier --check .

View file

@ -33,7 +33,7 @@ return {
ft('javascript,javascriptreact,typescript,typescriptreact')
:fmt('prettierd')
:lint('eslint_d')
ft('css,graphql,html,json,jsonc,mdx,yaml'):fmt('prettierd')
ft('css,graphql,html,json,jsonc,mdx,toml,yaml'):fmt('prettierd')
ft('sh,bash,zsh'):fmt({
cmd = 'shfmt',
@ -56,7 +56,8 @@ return {
ft('nix')
:fmt({
cmd = 'nix',
args = { 'fmt', '--' },
args = { 'fmt', '--', '--stdin' },
stdin = true,
fname = true,
})
:lint({

View file

@ -106,6 +106,9 @@
pkgs.statix
pkgs.nixfmt
pkgs.pre-commit
pkgs.nodePackages.prettier
pkgs.stylua
pkgs.selene
];
};