Skip to content

Commit

Permalink
feat: add doc generation check to CI (#2)
Browse files Browse the repository at this point in the history
## 📃 Summary

This PR adds a documentation check on the CI, so the user knows if they
forgot to generate latest version, or can see unwanted changes.
  • Loading branch information
shortcuts authored Jan 2, 2023
1 parent fbffb71 commit 15d4d14
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,34 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: JohnnyMorganz/stylua-action@v1
- uses: JohnnyMorganz/stylua-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --check .

documentation:
runs-on: ubuntu-latest
name: documentation
steps:
- uses: actions/checkout@v3

- name: setup neovim
uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: v0.8.2

- name: generate documentation
run: make documentation-ci

- name: check docs diff
run: exit $(git diff --name-only origin/main -- doc | wc -l)

tests:
needs: lint
needs:
- lint
- documentation
runs-on: ubuntu-latest
timeout-minutes: 2
strategy:
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@

## ⚡️ Features

- interactive `setup` script
- README.md template
- GitHub Release script
- Perfect for open-source:
- CODEOWNERS file for PR auto-assign
- Issues and PR templates
- CI with GitHub actions:
- Test running on multiple Neovim version
- Lint check on CI
- Minimal run time, ideal for free plan
- Lint check
- Documentation generation check
- Minimal run time, ideal for free plans
- Docs with [mini.nvim `doc` plugin](https://github.com/echasnovski/mini.nvim/blob/main/lua/mini/doc.lua)
- Tests with [mini.nvim `test` plugin](https://github.com/echasnovski/mini.nvim/blob/main/lua/mini/test.lua)
- Linting with [Stylua](https://github.com/JohnnyMorganz/StyLua)
Expand All @@ -25,7 +27,7 @@
## 📋 Installation

> **Note**:
> This section is only required if you wish to setup the same linter and changelog generator as I do.
> This section is only required if you wish to use the linter and changelog generator provided by the template.
- [Install Stylua linter](https://github.com/JohnnyMorganz/StyLua#installation)
- [Install git-chglog generator](https://github.com/git-chglog/git-chglog)
Expand Down Expand Up @@ -60,7 +62,7 @@ gh repo my-awesome-plugin -p shortcuts/neovim-plugin-boilerplate --public
The [setup script](https://github.com/shortcuts/neovim-plugin-boilerplate/blob/main/scripts/setup.sh) will rename files and placeholder names for you. Once done, you can remove anything `setup` related if you want to.

```sh
# interactively
# interactive
make setup

# automated
Expand Down

0 comments on commit 15d4d14

Please sign in to comment.