ci: more stuff
This commit is contained in:
parent
cd9f745ace
commit
4968e854e6
3 changed files with 47 additions and 2 deletions
41
.github/workflows/quality.yaml
vendored
41
.github/workflows/quality.yaml
vendored
|
|
@ -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 .
|
||||
|
|
|
|||
|
|
@ -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({
|
||||
|
|
|
|||
|
|
@ -106,6 +106,9 @@
|
|||
pkgs.statix
|
||||
pkgs.nixfmt
|
||||
pkgs.pre-commit
|
||||
pkgs.nodePackages.prettier
|
||||
pkgs.stylua
|
||||
pkgs.selene
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue