Skip to content
This repository was archived by the owner on Nov 30, 2025. It is now read-only.

Commit 97a5a3d

Browse files
authored
feat: add lint & release-please workflows (#9)
1 parent 5cc14c1 commit 97a5a3d

File tree

12 files changed

+109
-70
lines changed

12 files changed

+109
-70
lines changed

.github/workflows/docs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
name: Vim Doc
2+
13
on:
24
push:
35
branches:
46
- main
57

6-
name: docs
7-
88
permissions:
99
pull-requests: write
1010
contents: write
@@ -18,12 +18,12 @@ jobs:
1818
- name: panvimdoc
1919
uses: kdheepak/panvimdoc@main
2020
with:
21-
vimdoc: "nvim-java-core"
21+
vimdoc: "nvim-java-test"
2222
dedupsubheadings: false
2323
version: "Neovim >= 0.9.4"
2424
demojify: true
2525

26-
- name: Create Pull Request
26+
- name: create pull request
2727
uses: peter-evans/create-pull-request@v5
2828
with:
2929
base: "main"

.github/workflows/lint-test.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/lint.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
lint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: lunarmodules/luacheck@v1
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: LuaRocks Release
2+
on:
3+
push:
4+
tags:
5+
- "v*"
6+
jobs:
7+
luarocks-upload:
8+
runs-on: ubuntu-22.04
9+
steps:
10+
- uses: actions/checkout@v3
11+
12+
- name: luarocks upload
13+
uses: nvim-neorocks/luarocks-tag-release@v4
14+
env:
15+
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}

.github/workflows/release.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
1-
name: "release"
1+
name: Release
2+
23
on:
34
push:
4-
tags:
5-
- 'v*'
5+
branches: [main]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
permissions:
10+
pull-requests: write
11+
contents: write
12+
613
jobs:
7-
luarocks-upload:
8-
runs-on: ubuntu-22.04
14+
release:
15+
name: release
16+
if: ${{ github.ref == 'refs/heads/main' }}
17+
runs-on: ubuntu-latest
918
steps:
10-
- uses: actions/checkout@v3
11-
- name: LuaRocks Upload
12-
uses: nvim-neorocks/luarocks-tag-release@v4
13-
env:
14-
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
19+
- uses: google-github-actions/release-please-action@v3
20+
with:
21+
release-type: simple

.github/workflows/stylua.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Stylua
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
stylua:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: JohnnyMorganz/stylua-action@v3
13+
with:
14+
token: ${{ secrets.GITHUB_TOKEN }}
15+
version: latest
16+
args: --color always --check lua

.github/workflows/test.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
nvim-versions: ["stable", "nightly"]
13+
14+
name: test
15+
steps:
16+
- name: checkout
17+
uses: actions/checkout@v3
18+
19+
- uses: rhysd/action-setup-vim@v1
20+
with:
21+
neovim: true
22+
version: ${{ matrix.nvim-versions }}
23+
24+
- name: run tests
25+
run: make test

.luacheckrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
globals = {
2+
'vim.o',
3+
'vim.g',
4+
'vim.wo',
5+
'vim.bo',
6+
'vim.opt',
7+
}
8+
read_globals = {
9+
'vim',
10+
'describe',
11+
'it',
12+
'assert',
13+
}

lua/java-test/results/message-id.lua

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,4 @@ local MessageId = {
2727
ASSUMPTION_FAILED_TEST_PREFIX = '@AssumptionFailure: ',
2828
}
2929

30-
--[[
31-
*************
32-
%TESTC 2 v2
33-
%TSTTREE2,com.example.demo.DemoApplicationTests,true,2,false,1,DemoApplicationTests,,[engine:junit-jupiter]/[class:com.example.demo.DemoApplicationTests]
34-
%TSTTREE3,anotherTest(com.example.demo.DemoApplicationTests),false,1,false,2,anotherTest(),,[engine:junit-jupiter]/[class:com.example.demo.DemoApplicationTests]/[method:anotherTest()]
35-
%TSTTREE4,contextLoads(com.example.demo.DemoApplicationTests),false,1,false,2,contextLoads(),,[engine:junit-jupiter]/[class:com.example.demo.DemoApplicationTests]/[method:contextLoads()]
36-
%TESTS 3,anotherTest(com.example.demo.DemoApplicationTests)
37-
*************
38-
%TESTE 3,anotherTest(com.example.demo.DemoApplicationTests)
39-
*************
40-
%TESTS 4,contextLoads(com.example.demo.DemoApplicationTests)
41-
*************
42-
%TESTE 4,contextLoads(com.example.demo.DemoApplicationTests)
43-
%RUNTIME2281
44-
--]]
45-
4630
return MessageId

lua/java-test/results/result-parser-factory.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ local TestParserFactory = class()
77
---Returns a test parser of given type
88
---@param args any
99
---@return java_test.TestParser
10-
function TestParserFactory.get_parser(args)
10+
function TestParserFactory.get_parser(_args)
1111
return TestParser()
1212
end
1313

0 commit comments

Comments
 (0)