Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
- "scripts/**"
- "*.lua"
- "Makefile"
- "lux.toml"
- "lux.lock"
- ".github/workflows/**"

jobs:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ on:
- "scripts/**"
- "*.lua"
- "Makefile"
- "lux.toml"
- "lux.lock"
- ".github/workflows/e2e-test.yml"
- ".github/workflows/lux.yml"
workflow_call:

jobs:
Expand Down
47 changes: 27 additions & 20 deletions .github/workflows/luarocks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,32 @@ jobs:
- uses: actions/checkout@v7
with: { fetch-depth: 0 }

- name: Set Version
run: echo "LUAROCKS_VERSION=${{ needs.check_tag.outputs.tag }}" >> $GITHUB_ENV
- name: Install Lux
uses: lumen-oss/gh-actions-lux@v1
with:
version: 0.46.0

- name: Validate project
run: |
lx --lua-version 5.1 build
lx --lua-version 5.1 generate-rockspec

- name: LuaRocks Upload
uses: nvim-neorocks/luarocks-tag-release@v7
# NOTE: lux.toml is the single source of truth for the
# luarocks package (dependencies, build spec, metadata).
# `lx upload` generates the rockspec from lux.toml, so the
# dependencies below are informational only — keep them in
# sync with the [dependencies] table in lux.toml.
# NOTE: tree-sitter-java is intentionally NOT a dependency.
# The Java parser is provided by nvim-treesitter (`:TSInstall java`,
# see README prerequisites and `:checkhealth neotest-java`).
# Listing it here broke the release workflow because the
# tree-sitter-java rock needs the `treesitter-parser` build backend
# (luarocks-build-treesitter-parser), which luarocks 3.13 in the
# action's nix environment cannot find in the isolated test tree
# (see Release run 35866794049).
# Current lux.toml dependencies:
# neotest, nvim-nio, nvim-dap, nvim-dap-ui
- name: Lux Upload
run: lx upload --sign-protocol none
env:
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
with:
version: ${{ env.LUAROCKS_VERSION }}
# NOTE: tree-sitter-java is intentionally NOT a luarocks dependency.
# The Java parser is provided by nvim-treesitter (`:TSInstall java`,
# see README prerequisites and `:checkhealth neotest-java`).
# Listing it here broke the release workflow because the
# tree-sitter-java rock needs the `treesitter-parser` build backend
# (luarocks-build-treesitter-parser), which luarocks 3.13 in the
# action's nix environment cannot find in the isolated test tree
# (see Release run 35866794049).
dependencies: |
neotest
nvim-nio
nvim-dap
nvim-dap-ui
LUX_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
43 changes: 43 additions & 0 deletions .github/workflows/lux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Lux

on:
push:
branches: ["main"]
paths:
- "lux.toml"
- "lux.lock"
- ".github/workflows/lux.yml"
pull_request:
branches: ["main"]
paths:
- "lux.toml"
- "lux.lock"
- ".github/workflows/lux.yml"

jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7

- name: Install Lux
uses: lumen-oss/gh-actions-lux@v1
with:
version: 0.46.0

- name: Build dependencies
run: lx --lua-version 5.1 build --only-deps

- name: Generate rockspec
run: |
lx --lua-version 5.1 generate-rockspec
ls neotest-java-*.rockspec

# NOTE: `lx lint` (luacheck via lux) is intentionally not run
# here. It fails on GitHub-hosted ubuntu runners with
# `lfs.so: undefined symbol: lua_gettop` (lux's luacheck builds
# luafilesystem against incompatible Lua headers in that
# environment), while the dedicated `luacheck` job in
# static-analysis.yml covers the same check and passes.
6 changes: 6 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,21 @@ on:
- "*.lua"
- ".stylua.toml"
- ".luacheckrc"
- "lux.toml"
- "lux.lock"
- ".github/workflows/static-analysis.yml"
- ".github/workflows/lux.yml"
pull_request:
branches: ["main"]
paths:
- "lua/**"
- "*.lua"
- ".stylua.toml"
- ".luacheckrc"
- "lux.toml"
- "lux.lock"
- ".github/workflows/static-analysis.yml"
- ".github/workflows/lux.yml"

jobs:
luacheck:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ on:
- "scripts/**"
- "*.lua"
- "Makefile"
- "lux.toml"
- "lux.lock"
- ".github/workflows/test.yml"
- ".github/workflows/lux.yml"
workflow_call:

jobs:
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,9 @@ tests/fixtures/*/*.iml
.dependencies/
pack/

# Lux (https://github.com/lumen-oss/lux)
.lux/
*.rockspec

# OpenSpec: archived changes are historical record, not active work
openspec/changes/archive/
42 changes: 26 additions & 16 deletions .luarc.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
{
"diagnostics.globals": [
"vim",
"describe",
"it",
"assert",
"before_each",
"after_each",
"jit",
"_G",
"_NEOTEST_IS_CHILD",
"unpack"
],
"diagnostics.neededFileStatus": {
"undefined-field": "none",
"deprecated": "none"
}
"diagnostics.globals": [
"vim",
"describe",
"it",
"assert",
"before_each",
"after_each",
"jit",
"_G",
"_NEOTEST_IS_CHILD",
"unpack"
],
"diagnostics.neededFileStatus": {
"undefined-field": "none",
"deprecated": "none"
},
"workspace": {
"library": [
".lux/5.1/1cac0fb981f4b22dc93e889c354aaf639ed7ac9fe3fb98b349bfaea47f83efb7-nvim-dap@0.10.0-1/src",
".lux/5.1/8e323ff492bc769418af667a70f9172011b68f8290d7b2bf2f3acb147a04f00f-nvim-dap@0.10.0-1/src",
".lux/5.1/c2cca5b988043795056f705fdd6cce841d1476b9bb45aff389a5499aa6b79479-nvim-dap-ui@4.0.0-1/src",
".lux/5.1/de206edd51dbfc1bbe56869d6729cf4a6e6e70e7b2e107093c0f6520c142d79b-nvim-nio@1.10.1-1/src",
".lux/5.1/f93005c41bfd7f344700c1e7c2e423478991138d0f9f7ed512b263fe384313cc-nvim-nio@1.10.1-1/src",
".lux/5.1/fd3cf668616289b2b2d747e78a3786b371e3912050962a1378803e4de441842a-neotest@5.20.0-1/src"
]
}
}
29 changes: 29 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ You will need:
- `luacheck`
- `make`
- `git`
- `lx` (<https://lux.lumen-labs.org/>) — for package
management (`lux.toml` is the single source of truth
for the luarocks package)

#### First build

Expand Down Expand Up @@ -89,3 +92,29 @@ If you change Java source files, rebuild before running tests:
```bash
make clean && make
```

#### Packaging with Lux

This project uses [Lux](https://github.com/lumen-oss/lux)
for Lua package management. `lux.toml` is the single
source of truth — `lx upload` generates the rockspec
from it when publishing to
[luarocks.org](https://luarocks.org/modules/rcasia/neotest-java).

```bash
# Install/sync dependencies into .lux/
make lux-sync

# Build the project
make lux-build

# Lint via lux (luacheck)
make lux-lint

# Run the test suite via lux (delegates to `make test`)
make lux-test
```

`lux.lock` is committed for reproducible installs.
`.lux/` (local build tree) and generated `*.rockspec`
files are gitignored — never commit them.
17 changes: 16 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: clean test test-fail-fast test-e2e
.PHONY: clean test test-fail-fast test-e2e lux-sync lux-build lux-lint lux-test

all: hooks test

Expand Down Expand Up @@ -57,3 +57,18 @@ validate:

format:
stylua .

# Lux targets (https://github.com/lumen-oss/lux).
# lux.toml is the single source of truth for the luarocks package.
# These require `lx` on PATH (see https://lux.lumen-labs.org).
lux-sync:
lx --lua-version 5.1 sync

lux-build:
lx --lua-version 5.1 build

lux-lint:
lx --lua-version 5.1 lint

lux-test:
lx --lua-version 5.1 test
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,18 @@ with SHA-256 checksum verification.
> The plugin will detect if you have an older JUnit version
> installed and prompt you to upgrade.

### Packaging with Lux

This project uses [Lux](https://github.com/lumen-oss/lux)
for Lua package management. `lux.toml` is the single
source of truth — releases are published to
[luarocks.org](https://luarocks.org/modules/rcasia/neotest-java)
via `lx upload`, which generates the rockspec from it.

```bash
lx install neotest-java
```

## ⚙️ Configuration

All configuration options are optional.
Expand Down
Loading
Loading