From 3140c152ea83018d0a81fa66a8c9e5506dc6d8d1 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Mon, 23 Feb 2026 18:13:51 -0500 Subject: [PATCH] ci: migrate to nix --- .github/workflows/quality.yaml | 29 +++++++-------------------- selene.toml | 1 + vim.toml | 36 ---------------------------------- vim.yaml | 24 +++++++++++++++++++++++ 4 files changed, 32 insertions(+), 58 deletions(-) delete mode 100644 vim.toml create mode 100644 vim.yaml diff --git a/.github/workflows/quality.yaml b/.github/workflows/quality.yaml index 3bf8b57..8381400 100644 --- a/.github/workflows/quality.yaml +++ b/.github/workflows/quality.yaml @@ -26,6 +26,7 @@ jobs: - '*.lua' - '.luarc.json' - '*.toml' + - 'vim.yaml' markdown: - '*.md' @@ -36,11 +37,8 @@ jobs: if: ${{ needs.changes.outputs.lua == 'true' }} steps: - uses: actions/checkout@v4 - - uses: JohnnyMorganz/stylua-action@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - version: 2.1.0 - args: --check lua spec + - uses: cachix/install-nix-action@v31 + - run: nix develop --command stylua --check lua spec lua-lint: name: Lua Lint Check @@ -49,11 +47,8 @@ jobs: if: ${{ needs.changes.outputs.lua == 'true' }} steps: - uses: actions/checkout@v4 - - name: Lint with Selene - uses: NTBBloodbath/selene-action@v1.0.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --display-style quiet . + - uses: cachix/install-nix-action@v31 + - run: nix develop --command selene --display-style quiet . lua-typecheck: name: Lua Type Check @@ -74,15 +69,5 @@ jobs: if: ${{ needs.changes.outputs.markdown == 'true' }} steps: - uses: actions/checkout@v4 - - name: Setup pnpm - uses: pnpm/action-setup@v4 - with: - version: 8 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '20' - - name: Install prettier - run: pnpm add -g prettier@3.1.0 - - name: Check markdown formatting with prettier - run: prettier --check . + - uses: cachix/install-nix-action@v31 + - run: nix develop --command prettier --check . diff --git a/selene.toml b/selene.toml index 4fbd4a4..7f40a3f 100644 --- a/selene.toml +++ b/selene.toml @@ -4,3 +4,4 @@ exclude = [".direnv/*"] [lints] mixed_table = 'allow' unused_variable = 'allow' +bad_string_escape = 'allow' diff --git a/vim.toml b/vim.toml deleted file mode 100644 index 0fbe00a..0000000 --- a/vim.toml +++ /dev/null @@ -1,36 +0,0 @@ -[selene] -base = "lua51" -name = "vim" - -[vim] -any = true - -[jit] -any = true - -[bit] -any = true - -[assert] -any = true - -[a] -any = true - -[describe] -any = true - -[it] -any = true - -[before_each] -any = true - -[after_each] -any = true - -[spy] -any = true - -[stub] -any = true diff --git a/vim.yaml b/vim.yaml new file mode 100644 index 0000000..401fce6 --- /dev/null +++ b/vim.yaml @@ -0,0 +1,24 @@ +--- +base: lua51 +name: vim +lua_versions: + - luajit +globals: + vim: + any: true + jit: + any: true + assert: + any: true + describe: + any: true + it: + any: true + before_each: + any: true + after_each: + any: true + spy: + any: true + stub: + any: true