Skip to content

Commit

Permalink
refactor: squash history for release
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc-stripe committed Jul 31, 2024
1 parent 160841d commit f34d908
Show file tree
Hide file tree
Showing 60 changed files with 3,757 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
layout python
python -c 'import pyparsing' 2> /dev/null || pip install pyparsing==3.0.9 black isort mypy
116 changes: 116 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: Bug Report
description: File a bug/issue
title: "bug: "
labels: [bug]
body:
- type: markdown
attributes:
value: |
Before reporting a bug, make sure to search [existing issues](https://github.com/stevearc/quicker.nvim/issues)
- type: input
attributes:
label: "Neovim version (nvim -v)"
placeholder: "0.10.0 commit db1b0ee3b30f"
validations:
required: true
- type: input
attributes:
label: "Operating system/version"
placeholder: "MacOS 11.5"
validations:
required: true
- type: textarea
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is.
validations:
required: true
- type: dropdown
attributes:
label: What is the severity of this bug?
options:
- minor (annoyance)
- tolerable (can work around it)
- breaking (some functionality is broken)
- blocking (cannot use plugin)
validations:
required: true
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. nvim -u repro.lua
2.
3.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: true
- type: textarea
attributes:
label: Minimal example file
description: A small example file you are editing that produces the issue
validations:
required: false
- type: textarea
attributes:
label: Minimal init.lua
description:
Minimal `init.lua` to reproduce this issue. Save as `repro.lua` and run with `nvim -u repro.lua`
This uses lazy.nvim (a plugin manager).
value: |
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--single-branch",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
"folke/tokyonight.nvim",
{
"stevearc/quicker.nvim",
config = function()
require("quicker").setup({
-- add your config here
})
end,
},
-- add any other plugins here
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
render: Lua
validations:
required: false
- type: textarea
attributes:
label: Additional context
description: Any additional information or screenshots you would like to provide
validations:
required: false
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Feature Request
description: Submit a feature request
title: "feature request: "
labels: [enhancement]
body:
- type: markdown
attributes:
value: |
Before submitting a feature request, make sure to search for [existing requests](https://github.com/stevearc/quicker.nvim/issues)
- type: checkboxes
attributes:
label: Did you check existing requests?
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Describe the feature
description: A short summary of the feature you want
validations:
required: true
- type: textarea
attributes:
label: Provide background
description: Describe the reasoning behind why you want the feature.
placeholder: I am trying to do X. My current workflow is Y.
validations:
required: false
- type: dropdown
attributes:
label: What is the significance of this feature?
options:
- nice to have
- strongly desired
- cannot use this plugin without it
validations:
required: true
- type: textarea
attributes:
label: Additional details
description: Any additional information you would like to provide. Things you've tried, alternatives considered, examples from other plugins, etc.
validations:
required: false
3 changes: 3 additions & 0 deletions .github/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
set -e
make fastlint
11 changes: 11 additions & 0 deletions .github/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -e
IFS=' '
while read local_ref _local_sha _remote_ref _remote_sha; do
remote_main=$( (git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null || echo "///master") | cut -f 4 -d / | tr -d "[:space:]")
local_ref_short=$(echo "$local_ref" | cut -f 3 -d / | tr -d "[:space:]")
if [ "$local_ref_short" = "$remote_main" ]; then
make lint
make test
fi
done
16 changes: 16 additions & 0 deletions .github/workflows/automation_remove_question_label_on_comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Remove Question Label on Issue Comment

on: [issue_comment]

jobs:
# Remove the "question" label when a new comment is added.
# This lets me ask a question, tag the issue with "question", and filter out all "question"-tagged
# issues in my "needs triage" filter.
remove_question:
runs-on: ubuntu-latest
if: github.event.sender.login != 'stevearc'
steps:
- uses: actions/checkout@v4
- uses: actions-ecosystem/action-remove-labels@v1
with:
labels: question
27 changes: 27 additions & 0 deletions .github/workflows/automation_request_review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Request Review
permissions:
pull-requests: write
on:
pull_request_target:
types: [opened, reopened, ready_for_review, synchronize]
branches-ignore:
- "release-please--**"

jobs:
# Request review automatically when PRs are opened
request_review:
runs-on: ubuntu-latest
steps:
- name: Request Review
uses: actions/github-script@v7
if: github.actor != 'stevearc'
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const pr = context.payload.pull_request;
github.rest.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pr.number,
reviewers: ['stevearc']
});
12 changes: 12 additions & 0 deletions .github/workflows/install_nvim.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -e
PLUGINS="$HOME/.local/share/nvim/site/pack/plugins/start"
mkdir -p "$PLUGINS"

wget "https://github.com/neovim/neovim/releases/download/${NVIM_TAG-stable}/nvim.appimage"
chmod +x nvim.appimage
./nvim.appimage --appimage-extract >/dev/null
rm -f nvim.appimage
mkdir -p ~/.local/share/nvim
mv squashfs-root ~/.local/share/nvim/appimage
sudo ln -s "$HOME/.local/share/nvim/appimage/AppRun" /usr/bin/nvim
122 changes: 122 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: Run tests

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
luacheck:
name: Luacheck
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

- name: Prepare
run: |
sudo apt-get update
sudo add-apt-repository universe
sudo apt install luarocks -y
sudo luarocks install luacheck
- name: Run Luacheck
run: luacheck lua tests

typecheck:
name: typecheck
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: stevearc/nvim-typecheck-action@v2
with:
path: lua

stylua:
name: StyLua
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Stylua
uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: v0.20.0
args: --check lua tests

run_tests:
strategy:
matrix:
include:
- nvim_tag: v0.10.1

name: Run tests
runs-on: ubuntu-22.04
env:
NVIM_TAG: ${{ matrix.nvim_tag }}
steps:
- uses: actions/checkout@v4

- name: Install Neovim and dependencies
run: |
bash ./.github/workflows/install_nvim.sh
- name: Run tests
run: |
bash ./run_tests.sh
update_docs:
name: Update docs
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

- name: Install Neovim and dependencies
run: |
bash ./.github/workflows/install_nvim.sh
- name: Update docs
run: |
python -m pip install pyparsing==3.0.9
make doc
- name: Commit changes
if: ${{ github.ref == 'refs/heads/master' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMIT_MSG: |
[docgen] Update docs
skip-checks: true
run: |
git config user.email "actions@github"
git config user.name "Github Actions"
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
git add README.md doc
# Only commit and push if we have changes
git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push origin HEAD:${GITHUB_REF})
release:
name: release

if: ${{ github.ref == 'refs/heads/master' }}
needs:
- luacheck
- stylua
- typecheck
- run_tests
- update_docs
runs-on: ubuntu-22.04
steps:
- uses: googleapis/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
Loading

0 comments on commit f34d908

Please sign in to comment.