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
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
nix: ${{ steps.changes.outputs.nix }}
|
nix: ${{ steps.changes.outputs.nix }}
|
||||||
|
lua: ${{ steps.changes.outputs.lua }}
|
||||||
|
prettier: ${{ steps.changes.outputs.prettier }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: dorny/paths-filter@v3
|
- uses: dorny/paths-filter@v3
|
||||||
|
|
@ -21,6 +23,15 @@ jobs:
|
||||||
- '**/*.nix'
|
- '**/*.nix'
|
||||||
- 'flake.lock'
|
- 'flake.lock'
|
||||||
- 'flake.nix'
|
- 'flake.nix'
|
||||||
|
lua:
|
||||||
|
- '**/*.lua'
|
||||||
|
prettier:
|
||||||
|
- '**/*.json'
|
||||||
|
- '**/*.yaml'
|
||||||
|
- '**/*.yml'
|
||||||
|
- '**/*.md'
|
||||||
|
- '**/*.toml'
|
||||||
|
- '**/*.css'
|
||||||
|
|
||||||
nix-format:
|
nix-format:
|
||||||
name: Nix Format Check
|
name: Nix Format Check
|
||||||
|
|
@ -51,3 +62,33 @@ jobs:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: cachix/install-nix-action@v31
|
- uses: cachix/install-nix-action@v31
|
||||||
- run: nix develop --command statix check .
|
- 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')
|
ft('javascript,javascriptreact,typescript,typescriptreact')
|
||||||
:fmt('prettierd')
|
:fmt('prettierd')
|
||||||
:lint('eslint_d')
|
: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({
|
ft('sh,bash,zsh'):fmt({
|
||||||
cmd = 'shfmt',
|
cmd = 'shfmt',
|
||||||
|
|
@ -56,7 +56,8 @@ return {
|
||||||
ft('nix')
|
ft('nix')
|
||||||
:fmt({
|
:fmt({
|
||||||
cmd = 'nix',
|
cmd = 'nix',
|
||||||
args = { 'fmt', '--' },
|
args = { 'fmt', '--', '--stdin' },
|
||||||
|
stdin = true,
|
||||||
fname = true,
|
fname = true,
|
||||||
})
|
})
|
||||||
:lint({
|
:lint({
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,9 @@
|
||||||
pkgs.statix
|
pkgs.statix
|
||||||
pkgs.nixfmt
|
pkgs.nixfmt
|
||||||
pkgs.pre-commit
|
pkgs.pre-commit
|
||||||
|
pkgs.nodePackages.prettier
|
||||||
|
pkgs.stylua
|
||||||
|
pkgs.selene
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue