CI template for Neovim plugin project.
For PR branch:
- Conventional commits check.
- Type check by lua-language-server.
- Static check by selene.
- Code format by stylua.
- Run unit tests by vusted, for both Windows and Unix/Linux, and multiple Neovim versions from lowest to nightly.
- Upload code coverage by luacov.
Additionally for main/master branch:
- Click the "Use this template" button (in the top right) to create new Neovim plugin project.
- Go to project Settings => Security => Secrets and variables => Actions, and add below tokens:
- Go to project Settings => Code and automation => Actions => General => Workflow permissions, and select below options:
- Read and write permission.
- Allow GitHub Actions to create and approve pull requests.
- Clone the repository to local.
- Run
setup.pywith below arguments:--org: organization.--repo: repository.- (Optional)
--indent-size: indent size, by default is2. - (Optional)
--required-version: minimal required nvim version, by default is0.7.
- Remove
setup.pyand commit your first change.
Note
The setup.py script is actually doing below steps:
- Reset below files:
README.md.CHANGELOG.md..release-please-manifest.json.
- Update below files with provided
{org},{repo}(and optional{required_version}):LICENSE..luacov.- Action files in
github/workflows.
- Rename below files:
lua/ci-template.luatolua/{repo}.lua(.nvimsuffix is been removed if exists).spec/ci_template_spec.luatospec/{repo}_spec.lua(.nvimsuffix is been removed if exists).
- (Optional) reset the indent size with
{indent_size}in below files:.editorconfig..stylua.toml..nvim.lua.
Setup development environment with:
To run unit tests, install below dependencies:
Then run vusted ./spec.