Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add lint & release-please workflows #8

Merged
merged 1 commit into from
Dec 10, 2023
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
8 changes: 4 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Vim Doc

on:
push:
branches:
- main

name: docs

permissions:
pull-requests: write
contents: write
Expand All @@ -18,12 +18,12 @@ jobs:
- name: panvimdoc
uses: kdheepak/panvimdoc@main
with:
vimdoc: "nvim-java-core"
vimdoc: "nvim-java-dap"
dedupsubheadings: false
version: "Neovim >= 0.9.4"
demojify: true

- name: Create Pull Request
- name: create pull request
uses: peter-evans/create-pull-request@v5
with:
base: "main"
Expand Down
33 changes: 0 additions & 33 deletions .github/workflows/lint-test.yml

This file was deleted.

12 changes: 12 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Lint

on:
push:
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: lunarmodules/luacheck@v1
15 changes: 15 additions & 0 deletions .github/workflows/luarocks-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: LuaRocks Release
on:
push:
tags:
- "v*"
jobs:
luarocks-upload:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- name: luarocks upload
uses: nvim-neorocks/luarocks-tag-release@v4
env:
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
27 changes: 17 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
name: "release"
name: Release

on:
push:
tags:
- 'v*'
branches: [main]
pull_request:
workflow_dispatch:

permissions:
pull-requests: write
contents: write

jobs:
luarocks-upload:
runs-on: ubuntu-22.04
release:
name: release
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: LuaRocks Upload
uses: nvim-neorocks/luarocks-tag-release@v4
env:
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
- uses: google-github-actions/release-please-action@v3
with:
release-type: simple
16 changes: 16 additions & 0 deletions .github/workflows/stylua.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Stylua

on:
push:
pull_request:

jobs:
stylua:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: JohnnyMorganz/stylua-action@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --color always --check lua
25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Test

on:
push:
pull_request:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
nvim-versions: ["stable", "nightly"]

name: test
steps:
- name: checkout
uses: actions/checkout@v3

- uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: ${{ matrix.nvim-versions }}

- name: run tests
run: make test
13 changes: 13 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
globals = {
'vim.o',
'vim.g',
'vim.wo',
'vim.bo',
'vim.opt',
}
read_globals = {
'vim',
'describe',
'it',
'assert',
}