feat: first draft

This commit is contained in:
Steven Arcangeli 2022-12-15 02:24:27 -08:00
parent bf2dfb970d
commit fefd6ad5e4
48 changed files with 7201 additions and 1 deletions

12
.github/workflows/install_nvim.sh vendored Normal file
View file

@ -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}/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

54
.github/workflows/tests.yml vendored Normal file
View file

@ -0,0 +1,54 @@
name: Tests
on: [push, pull_request]
jobs:
luacheck:
name: Luacheck
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- 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 .
stylua:
name: StyLua
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Stylua
uses: JohnnyMorganz/stylua-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: v0.15.2
args: --check .
run_tests:
strategy:
matrix:
include:
- nvim_tag: v0.8.0
- nvim_tag: v0.8.1
name: Run tests
runs-on: ubuntu-22.04
env:
NVIM_TAG: ${{ matrix.nvim_tag }}
steps:
- uses: actions/checkout@v3
- name: Install Neovim and dependencies
run: |
bash ./.github/workflows/install_nvim.sh
- name: Run tests
run: |
bash ./run_tests.sh

36
.github/workflows/update-docs.yml vendored Normal file
View file

@ -0,0 +1,36 @@
name: Update docs
on: push
jobs:
update-readme:
name: Update docs
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install Neovim and dependencies
env:
NVIM_TAG: v0.8.1
run: |
bash ./.github/workflows/install_nvim.sh
- name: Update docs
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
python -m pip install pyparsing==3.0.9
python .github/main.py generate
python .github/main.py lint
nvim --headless -c 'set runtimepath+=.' -c 'helptags ALL' -c 'qall'
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})