mirror of https://github.com/folke/lazy.nvim.git
62 lines
1.8 KiB
YAML
62 lines
1.8 KiB
YAML
name: CI
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
tests:
|
|
strategy:
|
|
matrix:
|
|
# os: [ubuntu-latest, windows-latest]
|
|
os: [ubuntu-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install Neovim
|
|
shell: bash
|
|
run: |
|
|
if [ "$RUNNER_OS" == "Linux" ]; then
|
|
wget -q https://github.com/neovim/neovim/releases/download/nightly/nvim-linux64.deb -O /tmp/nvim.deb
|
|
sudo dpkg -i /tmp/nvim.deb
|
|
else
|
|
choco install neovim --pre
|
|
echo "C:/tools/neovim/nvim-win64/bin" >> $GITHUB_PATH
|
|
fi
|
|
- name: Run Tests
|
|
run: |
|
|
nvim --version
|
|
nvim --headless -u tests/init.lua -c "PlenaryBustedDirectory tests// {minimal_init = 'tests//init.lua', sequential = true}"
|
|
docs:
|
|
runs-on: ubuntu-latest
|
|
needs: tests
|
|
if: ${{ github.ref == 'refs/heads/main' }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: panvimdoc
|
|
uses: kdheepak/panvimdoc@main
|
|
with:
|
|
vimdoc: lazy.nvim
|
|
version: "Neovim >= 0.8.0"
|
|
demojify: true
|
|
- name: Code Blocks
|
|
run: sed -i 's/^>$/>lua/' doc/lazy.nvim.txt
|
|
- name: Push changes
|
|
uses: stefanzweifel/git-auto-commit-action@v4
|
|
with:
|
|
commit_message: "chore(build): auto-generate vimdoc"
|
|
commit_user_name: "github-actions[bot]"
|
|
commit_user_email: "github-actions[bot]@users.noreply.github.com"
|
|
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
|
|
release:
|
|
name: release
|
|
if: ${{ github.ref == 'refs/heads/main' }}
|
|
needs:
|
|
- docs
|
|
- tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: google-github-actions/release-please-action@v3
|
|
with:
|
|
release-type: simple
|
|
package-name: lazy.nvim
|