Skip to content

Commit

Permalink
feat(CI): update CI and other QoL updates (#39)
Browse files Browse the repository at this point in the history
* merge actions into a single workflow

* add stylua job, update action versions

add version property to stylua job

specify directory for stylua to check

add stylua config

* add housekeeping action

* update supported plugin list

* doc: auto-generate vimdoc

* add question and bug templates

---------

Co-authored-by: scottmckendry <[email protected]>
  • Loading branch information
scottmckendry and scottmckendry authored May 5, 2024
1 parent 61b2a27 commit 5f60b64
Show file tree
Hide file tree
Showing 10 changed files with 177 additions and 61 deletions.
59 changes: 59 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Bug Report
description: Report a problem with cyberdream
labels: [bug]
body:
- type: markdown
attributes:
value: >
Please make sure cyberdream is up to date before reporting a bug!
- type: textarea
attributes:
label: "Description"
description: "What is the issue?"
validations:
required: true

- type: input
attributes:
label: "Neovim version?"
description: |
Output of `nvim --version`
validations:
required: true

- type: textarea
attributes:
label: "What should happen?"
description: "A clear and concise description of what you expected to happen or what you expected to see."

- type: textarea
attributes:
label: "What happened instead?"
description: "Based on the description above, what actually happened. Screenshots are helpful."
validations:
required: true

- type: textarea
attributes:
label: "Your configuration"
description: >
Minimal configuration necessary to reproduce the issue. Include any relevant plugins and settings.
render: Lua
value: |
{
"scottmckendry/cyberdream.nvim",
lazy = false,
priority = 1000,
config = function()
require("cyberdream").setup({
transparent = true,
italic_comments = true,
hide_fillchars = true,
borderless_telescope = true,
})
vim.cmd("colorscheme cyberdream")
end,
}
validations:
required: true
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Ask a Question
description: Ask a question or suggest an idea or feature
labels: [question]
body:
- type: textarea
attributes:
label: "Question or Suggestion"
description: "Ask a question or suggest an idea or feature"
validations:
required: true
65 changes: 65 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: CI
on:
push:

jobs:
stylua:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Run Stylua
uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.RELEASE_TOKEN }}
version: latest
args: --color always --check .

generate-extras:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Neovim
uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: stable

- name: Generate Extras
run: |
nvim -u NONE -E -R --headless --cmd "set rtp^=." --cmd "lua require('cyberdream.extra').generate_all_extras()" --cmd qa
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: generate extras"

generate-doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: panvimdoc
uses: kdheepak/panvimdoc@main
with:
vimdoc: cyberdream
version: "Neovim >= 0.9.0"
titledatepattern: "%Y"
demojify: true
treesitter: true

- name: Push changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "doc: auto-generate vimdoc"

release:
runs-on: ubuntu-latest
needs: [generate-extras, generate-doc, stylua]
if: github.ref == 'refs/heads/main'
steps:
- uses: google-github-actions/release-please-action@v4
with:
token: ${{ secrets.RELEASE_TOKEN }}
release-type: simple
24 changes: 0 additions & 24 deletions .github/workflows/extras.yml

This file was deleted.

33 changes: 33 additions & 0 deletions .github/workflows/housekeeping.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Housekeeping

on:
issue_comment:
schedule:
- cron: "0 0 * * *" # once daily

jobs:
update-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.RELEASE_TOKEN }}
days-before-stale: -1 # never add label automatically
days-before-close: 7
stale-issue-label: "waiting for op"
stale-pr-label: "waiting for op"
close-issue-label: "autoclosed"
close-pr-label: "autoclosed"

remove-waiting-label:
runs-on: ubuntu-latest
if: github.event.sender.login != 'scottmckendry' && github.event_name == 'issue_comment'
steps:
- uses: mondeja/remove-labels-gh-action@v2
with:
token: ${{ secrets.RELEASE_TOKEN }}
labels: |
waiting for op
13 changes: 0 additions & 13 deletions .github/workflows/release.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/vimdoc.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .stylua.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
column_width = 120
indent_type = "Spaces"
indent_width = 4
quote_style = "AutoPreferDouble"
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,18 @@
<summary><b>Supported Plugins</b></summary>
<ul>
<li><input type="checkbox" checked disabled><label for=""><a href="https://github.com/goolord/alpha-nvim"> alpha-nvim</a></label></li>
<li><input type="checkbox" checked disabled><label for=""><a href="https://github.com/nvimdev/dashboard-nvim"> dashboard-nvim</a></label></li>
<li><input type="checkbox" checked disabled><label for=""><a href="https://github.com/lewis6991/gitsigns.nvim"> gitsigns.nvim</a></label></li>
<li><input type="checkbox" checked disabled><label for=""><a href="https://github.com/Zeioth/heirline-components.nvim"> heirline-components.nvim</a></label></li>
<li><input type="checkbox" checked disabled><label for=""><a href="https://github.com/lukas-reineke/indent-blankline.nvim"> indent-blankline.nvim</a></label></li>
<li><input type="checkbox" checked disabled><label for=""><a href="https://github.com/folke/lazy.nvim"> lazy.nvim</a></label></li>
<li><input type="checkbox" checked disabled><label for=""><a href="https://github.com/ggandor/leap.nvim"> leap.nvim</a></label></li>
<li><input type="checkbox" checked disabled><label for=""><a href="https://github.com/nvim-lualine/lualine.nvim"> lualine.nvim</a></label></li>
<li><input type="checkbox" checked disabled><label for=""><a href="https://github.com/folke/noice.nvim"> noice.nvim</a></label></li>
<li><input type="checkbox" checked disabled><label for=""><a href="https://github.com/hrsh7th/nvim-cmp"> nvim-cmp</a></label></li>
<li><input type="checkbox" checked disabled><label for=""><a href="https://github.com/rcarriga/nvim-notify"> nvim-notify</a></label></li>
<li><input type="checkbox" checked disabled><label for=""><a href="https://github.com/nvim-treesitter/nvim-treesitter"> nvim-treesitter</a></label></li>
<li><input type="checkbox" checked disabled><label for=""><a href="https://github.com/nvim-treesitter/nvim-treesitter-context"> nvim-treesitter-context</a></label></li>
<li><input type="checkbox" checked disabled><label for=""><a href="https://github.com/HiPhish/rainbow-delimiters.nvim"> rainbow-delimiters.nvim</a></label></li>
<li><input type="checkbox" checked disabled><label for=""><a href="https://github.com/nvim-telescope/telescope.nvim"> telescope.nvim</a></label></li>
<li><input type="checkbox" checked disabled><label for=""><a href="https://github.com/folke/which-key.nvim"> which-key.nvim</a></label></li>
Expand Down
2 changes: 1 addition & 1 deletion doc/cyberdream.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ FEATURES *cyberdream-features*

Supported Plugins ~

alpha-nvim gitsigns.nvim heirline-components.nvim lazy.nvim leap.nvim lualine.nvim nvim-cmp nvim-treesitter rainbow-delimiters.nvim telescope.nvim which-key.nvim
alpha-nvim dashboard-nvim gitsigns.nvim heirline-components.nvim indent-blankline.nvim lazy.nvim leap.nvim lualine.nvim noice.nvim nvim-cmp nvim-notify nvim-treesitter nvim-treesitter-context rainbow-delimiters.nvim telescope.nvim which-key.nvim


INSTALLATION *cyberdream-installation*
Expand Down

0 comments on commit 5f60b64

Please sign in to comment.