Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
linrongbin16 authored Dec 11, 2023
0 parents commit 3bd809a
Show file tree
Hide file tree
Showing 16 changed files with 1,065 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
root = true
end_of_line = lf
insert_final_newline = false
charset = utf-8
trim_trailing_whitespace = true
indent_style = space
indent_size = 2
126 changes: 126 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
concurrency:
group: ${{ github.ref }}-ci
cancel-in-progress: true
jobs:
pr_conventional_commit:
name: PR Conventional Commit
if: ${{ github.ref != 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ytanikin/[email protected]
with:
task_types: '["feat","fix","docs","test","ci","refactor","perf","chore","revert","break"]'
luacheck:
name: Lua check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: stevearc/nvim-typecheck-action@v1
with:
path: lua
level: Information
configpath: ".luarc.json"
neodev-version: stable
- uses: lunarmodules/luacheck@v1
with:
args: lua --config .luacheckrc
- uses: JohnnyMorganz/stylua-action@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --config-path .stylua.toml ./lua ./test
- name: Add json.lua
if: ${{ github.ref != 'refs/heads/main' }}
shell: bash
run: |
echo "pwd"
echo $PWD
git clone --depth=1 https://github.com/actboy168/json.lua.git ~/.json.lua
cp ~/.json.lua/json.lua ./lua/actboy168_json.lua
- uses: stefanzweifel/git-auto-commit-action@v4
if: ${{ github.ref != 'refs/heads/main' }}
with:
commit_message: "chore(pr): auto-commit"
unit_test:
name: Unit Test
strategy:
matrix:
nvim_version: [stable, nightly, v0.7.0]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: rhysd/action-setup-vim@v1
id: vim
with:
neovim: true
version: ${{ matrix.nvim_version }}
- uses: leafo/gh-actions-lua@v10
with:
luaVersion: "luajit-2.1.0-beta3"
- uses: leafo/gh-actions-luarocks@v4
- name: Run test cases
shell: bash
run: |
luarocks install luacheck
luarocks install luacov
luarocks install cluacov
luarocks install vusted
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
export PATH="$HOME/.fzf/bin:$PATH"
vusted --coverage --shuffle ./test
- name: Generate coverage reports
shell: bash
run: |
echo "ls ."
ls -l .
echo "run luacov"
luacov
echo "ls ."
ls -l .
echo "cat ./luacov.report.out"
cat ./luacov.report.out
- uses: codecov/codecov-action@v3
with:
files: luacov.report.out
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
release:
name: Release
if: ${{ github.ref == 'refs/heads/main' }}
needs:
- luacheck
- unit_test
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
release-type: simple
- uses: actions/checkout@v4
- uses: rickstaa/action-create-tag@v1
if: ${{ steps.release.outputs.release_created }}
with:
tag: stable
message: "Current stable release: ${{ steps.release.outputs.tag_name }}"
tag_exists_error: false
force_push_tag: true
- uses: nvim-neorocks/luarocks-tag-release@v5
if: ${{ steps.release.outputs.release_created }}
env:
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
with:
name: linrongbin16-ci-template.nvim
version: ${{ steps.release.outputs.tag_name }}
labels: |
neovim
vim
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Compiled Lua sources
luac.out

# luarocks build files
*.src.rock
*.zip
*.tar.gz

# Object files
*.o
*.os
*.ko
*.obj
*.elf

# Precompiled Headers
*.gch
*.pch

# Libraries
*.lib
*.a
*.la
*.lo
*.def
*.exp

# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib

# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex

# macOS
.DS_Store
4 changes: 4 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
globals = { "vim", "describe", "before_each", "it", "assert" }
max_line_length = 500
unused = false
unused_args = false
8 changes: 8 additions & 0 deletions .luacov
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
modules = {
["ci-template"] = "lua/ci-template.lua",
["ci-template.*"] = "lua",
}

exclude = {
"lua/actboy168_json.lua",
}
4 changes: 4 additions & 0 deletions .luarc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"diagnostics.globals": ["vim", "describe", "before_each", "it", "jit"],
"workspace.checkThirdParty": "Disable"
}
3 changes: 3 additions & 0 deletions .nvim.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
vim.opt.tabstop = 2
vim.opt.softtabstop = 2
vim.opt.shiftwidth = 2
4 changes: 4 additions & 0 deletions .stylua.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
column_width = 80
line_endings = "Unix"
indent_type = "Spaces"
indent_width = 2
166 changes: 166 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
# Changelog

## [1.5.5](https://github.com/linrongbin16/ci-template.nvim/compare/v1.5.4...v1.5.5) (2023-12-11)


### Bug Fixes

* **docs:** typing ([#31](https://github.com/linrongbin16/ci-template.nvim/issues/31)) ([e875d30](https://github.com/linrongbin16/ci-template.nvim/commit/e875d3065a5ef294818302b8d8d32ea99e1e0c57))


### Performance Improvements

* **docs:** squash and merge PRs ([#33](https://github.com/linrongbin16/ci-template.nvim/issues/33)) ([46f3103](https://github.com/linrongbin16/ci-template.nvim/commit/46f310397e53b91620e49da4348a59132469470f))
* **docs:** use template ([#30](https://github.com/linrongbin16/ci-template.nvim/issues/30)) ([122fe28](https://github.com/linrongbin16/ci-template.nvim/commit/122fe2810fd770b04d855f51bd11784f67421523))

## [1.5.4](https://github.com/linrongbin16/ci-template.nvim/compare/v1.5.3...v1.5.4) (2023-12-11)


### Performance Improvements

* **exrc:** add indent size for project local options ([#28](https://github.com/linrongbin16/ci-template.nvim/issues/28)) ([852dadb](https://github.com/linrongbin16/ci-template.nvim/commit/852dadb2d78e08e3cca43b3ab551802bb8f81a25))

## [1.5.3](https://github.com/linrongbin16/ci-template.nvim/compare/v1.5.2...v1.5.3) (2023-12-11)


### Performance Improvements

* **docs:** add development ([#26](https://github.com/linrongbin16/ci-template.nvim/issues/26)) ([e99aae2](https://github.com/linrongbin16/ci-template.nvim/commit/e99aae254f369428fb0365f281b212297751cc61))

## [1.5.2](https://github.com/linrongbin16/ci-template.nvim/compare/v1.5.1...v1.5.2) (2023-12-11)


### Performance Improvements

* **docs:** add usage ([#24](https://github.com/linrongbin16/ci-template.nvim/issues/24)) ([93bb632](https://github.com/linrongbin16/ci-template.nvim/commit/93bb6326f4fba51441c790bb62144844d6b309d5))

## [1.5.1](https://github.com/linrongbin16/ci-template.nvim/compare/v1.5.0...v1.5.1) (2023-12-09)


### Performance Improvements

* **codecov:** exclude json.lua file ([#20](https://github.com/linrongbin16/ci-template.nvim/issues/20)) ([e860434](https://github.com/linrongbin16/ci-template.nvim/commit/e860434f681b4fa4edf229726fbb5a76d3268cf0))

## [1.5.0](https://github.com/linrongbin16/ci-template.nvim/compare/v1.4.1...v1.5.0) (2023-12-09)


### Features

* **docs:** badges ([1db7f39](https://github.com/linrongbin16/ci-template.nvim/commit/1db7f393ca59eae83e0d86d4d9fbac218918deb3))
* **docs:** badges ([ef6f6ef](https://github.com/linrongbin16/ci-template.nvim/commit/ef6f6efae82ec5c55fb4fad188877051d3ab0d81))


### Bug Fixes

* **docs:** fix minimal require Neovim version ([#19](https://github.com/linrongbin16/ci-template.nvim/issues/19)) ([bce58e3](https://github.com/linrongbin16/ci-template.nvim/commit/bce58e3a601db958b08abf0fbef2bd6801149194))

## [1.4.1](https://github.com/linrongbin16/ci-template.nvim/compare/v1.4.0...v1.4.1) (2023-12-09)


### Bug Fixes

* **ci:** remove personal token from release-please ([733ff89](https://github.com/linrongbin16/ci-template.nvim/commit/733ff89d298ea27bfdbd4bc3b44b078679742180))

## [1.4.0](https://github.com/linrongbin16/ci-template.nvim/compare/v1.3.0...v1.4.0) (2023-12-09)


### Features

* use personal token for please-release ([92ee485](https://github.com/linrongbin16/ci-template.nvim/commit/92ee4855ec842794a353ffd5b3f343dd02a689fb))
* use personal token for please-release ([bfd498a](https://github.com/linrongbin16/ci-template.nvim/commit/bfd498aab95bcda96214327e590b737a553fdcf4))


### Bug Fixes

* ci ([219a0fe](https://github.com/linrongbin16/ci-template.nvim/commit/219a0fe86ddd2b1dcd4c4f8779e8aa4778959785))
* **ci:** revert luarocks ([1d36abd](https://github.com/linrongbin16/ci-template.nvim/commit/1d36abd0da12b7f716dfc560c21f53721d56e0d2))
* **ci:** revert luarocks ([97f2bb8](https://github.com/linrongbin16/ci-template.nvim/commit/97f2bb81c05c575c783606e133ff4c78e3195c52))
* Update ci.yml ([219a0fe](https://github.com/linrongbin16/ci-template.nvim/commit/219a0fe86ddd2b1dcd4c4f8779e8aa4778959785))


### Performance Improvements

* Create ci-template.lua ([6127e76](https://github.com/linrongbin16/ci-template.nvim/commit/6127e76bac797180d97e1ec75901c2dea6fc5622))
* Create version.txt ([bd7241f](https://github.com/linrongbin16/ci-template.nvim/commit/bd7241f213cef3e44577069f4a59a67b78e93d2e))
* explicit name for luarocks ([ea4eb52](https://github.com/linrongbin16/ci-template.nvim/commit/ea4eb526bc46e117d83a80935defd2c1efd34c13))
* explicit name for luarocks ([ea4eb52](https://github.com/linrongbin16/ci-template.nvim/commit/ea4eb526bc46e117d83a80935defd2c1efd34c13))
* explicit name for luarocks ([54a8618](https://github.com/linrongbin16/ci-template.nvim/commit/54a861862a90928b87a9bf70066ea1ed94adee9c))
* rename to ci-template ([6127e76](https://github.com/linrongbin16/ci-template.nvim/commit/6127e76bac797180d97e1ec75901c2dea6fc5622))
* version.txt ([bd7241f](https://github.com/linrongbin16/ci-template.nvim/commit/bd7241f213cef3e44577069f4a59a67b78e93d2e))

## [1.3.0](https://github.com/linrongbin16/ci-template.nvim/compare/v1.2.0...v1.3.0) (2023-12-09)


### Features

* use personal token for please-release ([92ee485](https://github.com/linrongbin16/ci-template.nvim/commit/92ee4855ec842794a353ffd5b3f343dd02a689fb))
* use personal token for please-release ([bfd498a](https://github.com/linrongbin16/ci-template.nvim/commit/bfd498aab95bcda96214327e590b737a553fdcf4))


### Bug Fixes

* ci ([219a0fe](https://github.com/linrongbin16/ci-template.nvim/commit/219a0fe86ddd2b1dcd4c4f8779e8aa4778959785))
* Update ci.yml ([219a0fe](https://github.com/linrongbin16/ci-template.nvim/commit/219a0fe86ddd2b1dcd4c4f8779e8aa4778959785))


### Performance Improvements

* Create ci-template.lua ([6127e76](https://github.com/linrongbin16/ci-template.nvim/commit/6127e76bac797180d97e1ec75901c2dea6fc5622))
* Create version.txt ([bd7241f](https://github.com/linrongbin16/ci-template.nvim/commit/bd7241f213cef3e44577069f4a59a67b78e93d2e))
* explicit name for luarocks ([ea4eb52](https://github.com/linrongbin16/ci-template.nvim/commit/ea4eb526bc46e117d83a80935defd2c1efd34c13))
* explicit name for luarocks ([ea4eb52](https://github.com/linrongbin16/ci-template.nvim/commit/ea4eb526bc46e117d83a80935defd2c1efd34c13))
* explicit name for luarocks ([54a8618](https://github.com/linrongbin16/ci-template.nvim/commit/54a861862a90928b87a9bf70066ea1ed94adee9c))
* rename to ci-template ([6127e76](https://github.com/linrongbin16/ci-template.nvim/commit/6127e76bac797180d97e1ec75901c2dea6fc5622))
* version.txt ([bd7241f](https://github.com/linrongbin16/ci-template.nvim/commit/bd7241f213cef3e44577069f4a59a67b78e93d2e))

## [1.2.0](https://github.com/linrongbin16/ci-template.nvim/compare/v1.1.0...v1.2.0) (2023-12-09)


### Features

* use personal token for please-release ([92ee485](https://github.com/linrongbin16/ci-template.nvim/commit/92ee4855ec842794a353ffd5b3f343dd02a689fb))
* use personal token for please-release ([bfd498a](https://github.com/linrongbin16/ci-template.nvim/commit/bfd498aab95bcda96214327e590b737a553fdcf4))


### Bug Fixes

* ci ([219a0fe](https://github.com/linrongbin16/ci-template.nvim/commit/219a0fe86ddd2b1dcd4c4f8779e8aa4778959785))
* Update ci.yml ([219a0fe](https://github.com/linrongbin16/ci-template.nvim/commit/219a0fe86ddd2b1dcd4c4f8779e8aa4778959785))


### Performance Improvements

* Create ci-template.lua ([6127e76](https://github.com/linrongbin16/ci-template.nvim/commit/6127e76bac797180d97e1ec75901c2dea6fc5622))
* Create version.txt ([bd7241f](https://github.com/linrongbin16/ci-template.nvim/commit/bd7241f213cef3e44577069f4a59a67b78e93d2e))
* explicit name for luarocks ([ea4eb52](https://github.com/linrongbin16/ci-template.nvim/commit/ea4eb526bc46e117d83a80935defd2c1efd34c13))
* explicit name for luarocks ([ea4eb52](https://github.com/linrongbin16/ci-template.nvim/commit/ea4eb526bc46e117d83a80935defd2c1efd34c13))
* explicit name for luarocks ([54a8618](https://github.com/linrongbin16/ci-template.nvim/commit/54a861862a90928b87a9bf70066ea1ed94adee9c))
* rename to ci-template ([6127e76](https://github.com/linrongbin16/ci-template.nvim/commit/6127e76bac797180d97e1ec75901c2dea6fc5622))
* version.txt ([bd7241f](https://github.com/linrongbin16/ci-template.nvim/commit/bd7241f213cef3e44577069f4a59a67b78e93d2e))

## [1.1.0](https://github.com/linrongbin16/ci-template.nvim/compare/v1.0.0...v1.1.0) (2023-12-09)


### Features

* use personal token for please-release ([92ee485](https://github.com/linrongbin16/ci-template.nvim/commit/92ee4855ec842794a353ffd5b3f343dd02a689fb))
* use personal token for please-release ([bfd498a](https://github.com/linrongbin16/ci-template.nvim/commit/bfd498aab95bcda96214327e590b737a553fdcf4))

## 1.0.0 (2023-12-09)


### Bug Fixes

* ci ([219a0fe](https://github.com/linrongbin16/ci-template.nvim/commit/219a0fe86ddd2b1dcd4c4f8779e8aa4778959785))
* Update ci.yml ([219a0fe](https://github.com/linrongbin16/ci-template.nvim/commit/219a0fe86ddd2b1dcd4c4f8779e8aa4778959785))


### Performance Improvements

* Create ci-template.lua ([6127e76](https://github.com/linrongbin16/ci-template.nvim/commit/6127e76bac797180d97e1ec75901c2dea6fc5622))
* Create version.txt ([bd7241f](https://github.com/linrongbin16/ci-template.nvim/commit/bd7241f213cef3e44577069f4a59a67b78e93d2e))
* explicit name for luarocks ([ea4eb52](https://github.com/linrongbin16/ci-template.nvim/commit/ea4eb526bc46e117d83a80935defd2c1efd34c13))
* explicit name for luarocks ([ea4eb52](https://github.com/linrongbin16/ci-template.nvim/commit/ea4eb526bc46e117d83a80935defd2c1efd34c13))
* explicit name for luarocks ([54a8618](https://github.com/linrongbin16/ci-template.nvim/commit/54a861862a90928b87a9bf70066ea1ed94adee9c))
* rename to ci-template ([6127e76](https://github.com/linrongbin16/ci-template.nvim/commit/6127e76bac797180d97e1ec75901c2dea6fc5622))
* version.txt ([bd7241f](https://github.com/linrongbin16/ci-template.nvim/commit/bd7241f213cef3e44577069f4a59a67b78e93d2e))
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 linrongbin16

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 3bd809a

Please sign in to comment.