mirror of
https://github.com/linrongbin16/lsp-progress.nvim.git
synced 2024-09-16 14:24:06 +02:00
ci(selene): migrate 'luacheck' to 'selene' (#128)
This commit is contained in:
parent
b673377c50
commit
1c37b1cd06
4 changed files with 40 additions and 19 deletions
29
.github/workflows/ci.yml
vendored
29
.github/workflows/ci.yml
vendored
|
@ -6,19 +6,18 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
jobs:
|
||||
conventional_commit:
|
||||
name: Conventional Commit
|
||||
commit:
|
||||
name: Commit
|
||||
if: ${{ github.ref != 'refs/heads/main' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ytanikin/PRConventionalCommits@1.1.0
|
||||
with:
|
||||
task_types: '["feat","fix","docs","test","ci","refactor","perf","chore","revert","break"]'
|
||||
luacheck:
|
||||
name: Lua check
|
||||
- uses: amannn/action-semantic-pull-request@v5
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
@ -28,15 +27,17 @@ jobs:
|
|||
level: Information
|
||||
configpath: ".luarc.json"
|
||||
neodev-version: stable
|
||||
- uses: lunarmodules/luacheck@v1
|
||||
with:
|
||||
args: lua --config .luacheckrc
|
||||
- uses: cargo-bins/cargo-binstall@main
|
||||
- name: Selene
|
||||
run: |
|
||||
cargo binstall --no-confirm selene
|
||||
selene --config selene.toml ./lua
|
||||
- uses: JohnnyMorganz/stylua-action@v3
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: latest
|
||||
args: --config-path .stylua.toml ./lua ./test
|
||||
- uses: stefanzweifel/git-auto-commit-action@v4
|
||||
- uses: stefanzweifel/git-auto-commit-action@v5
|
||||
if: ${{ github.ref != 'refs/heads/main' }}
|
||||
with:
|
||||
commit_message: "chore(pr): auto-commit"
|
||||
|
@ -60,7 +61,6 @@ jobs:
|
|||
- name: Run Tests
|
||||
shell: bash
|
||||
run: |
|
||||
luarocks install luacheck
|
||||
luarocks install vusted
|
||||
vusted --shuffle ./test
|
||||
code_coverage:
|
||||
|
@ -80,7 +80,6 @@ jobs:
|
|||
- name: Run Tests
|
||||
shell: bash
|
||||
run: |
|
||||
luarocks install luacheck
|
||||
luarocks install luacov
|
||||
luarocks install vusted
|
||||
vusted --coverage ./test
|
||||
|
@ -104,7 +103,7 @@ jobs:
|
|||
name: Release
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
needs:
|
||||
- luacheck
|
||||
- lint
|
||||
- unit_test
|
||||
- code_coverage
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
globals = { "vim", "describe", "before_each", "it", "assert" }
|
||||
max_line_length = 200
|
||||
unused = false
|
||||
unused_args = false
|
8
selene.toml
Normal file
8
selene.toml
Normal file
|
@ -0,0 +1,8 @@
|
|||
std = "vim"
|
||||
|
||||
exclude = []
|
||||
|
||||
[lints]
|
||||
mixed_table = "allow"
|
||||
unused_variable = "allow"
|
||||
incorrect_standard_library_use = "allow"
|
18
vim.toml
Normal file
18
vim.toml
Normal file
|
@ -0,0 +1,18 @@
|
|||
[selene]
|
||||
base = "lua51"
|
||||
|
||||
[vim]
|
||||
any = true
|
||||
|
||||
[it]
|
||||
any = true
|
||||
|
||||
[describe]
|
||||
any = true
|
||||
|
||||
[before_each]
|
||||
any = true
|
||||
|
||||
[assert]
|
||||
any = true
|
||||
|
Loading…
Reference in a new issue