Skip to content

Commit 0751359

Browse files
authored
feat: add lint & release-please workflows (nvim-java#67)
1 parent 543ffa0 commit 0751359

File tree

10 files changed

+103
-47
lines changed

10 files changed

+103
-47
lines changed

.github/workflows/docs.yml

Lines changed: 3 additions & 3 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
@@ -23,7 +23,7 @@ jobs:
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/dap/init.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ local DapSetup = require('java-dap.api.setup')
99
local DapRunner = require('java-dap.api.runner')
1010

1111
local JavaCoreTestApi = require('java-core.api.test')
12-
local JavaCoreTestClient = require('java-core.ls.clients.java-test-client')
1312

1413
---@class JavaDap
1514
---@field private client LspClient

lua/java/utils/log.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ log.new = function(config, standalone)
160160
end)
161161
end
162162
end
163+
164+
return obj
163165
end
164166

165167
log.new(default_config, true)

0 commit comments

Comments
 (0)