diff options
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/docgen.yml | 10 | ||||
| -rw-r--r-- | .github/workflows/gen-annotations.yml | 49 | ||||
| -rw-r--r-- | .github/workflows/lint.yml | 6 | ||||
| -rw-r--r-- | .github/workflows/test.yml | 2 |
4 files changed, 62 insertions, 5 deletions
diff --git a/.github/workflows/docgen.yml b/.github/workflows/docgen.yml index 059d9cc5..789ce2c5 100644 --- a/.github/workflows/docgen.yml +++ b/.github/workflows/docgen.yml @@ -7,6 +7,7 @@ on: jobs: docgen: + if: github.repository == 'neovim/nvim-lspconfig' runs-on: ubuntu-latest permissions: contents: write @@ -29,4 +30,11 @@ jobs: git config user.email "github-actions[bot]@users.noreply.github.com" git add doc/configs.md doc/configs.txt # Only commit and push if we have changes - git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push) + git diff --quiet && git diff --staged --quiet || ( + git commit -m "${COMMIT_MSG}" + for i in 1 2 3; do + git pull --rebase && git push && break + echo "Push failed (attempt $i), retrying..." + sleep 5 + done + ) diff --git a/.github/workflows/gen-annotations.yml b/.github/workflows/gen-annotations.yml new file mode 100644 index 00000000..6a6b3365 --- /dev/null +++ b/.github/workflows/gen-annotations.yml @@ -0,0 +1,49 @@ +name: gen-annotations + +on: + push: + branches: + - master + paths: + - lsp/** + - scripts/gen_json_schemas.lua + - scripts/gen_annotations.lua + - .github/workflows/gen-annotations.yml + workflow_dispatch: + +jobs: + gen-annotations: + if: github.actor != 'github-actions[bot]' && github.repository == 'neovim/nvim-lspconfig' + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v6 + - uses: rhysd/action-setup-vim@v1 + with: + neovim: true + version: nightly + - name: Generate JSON schemas + run: | + nvim -l scripts/gen_json_schemas.lua + - name: Generate annotations + run: | + nvim -l scripts/gen_annotations.lua + - name: Commit generated files + env: + COMMIT_MSG: | + docs: update generated annotations + skip-checks: true + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add README.md + git add -A lua/lspconfig/types + git diff --quiet && git diff --staged --quiet || ( + git commit -m "${COMMIT_MSG}" + for i in 1 2 3; do + git pull --rebase && git push && break + echo "Push failed (attempt $i), retrying..." + sleep 5 + done + ) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 23b033a8..3cf80677 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -39,14 +39,14 @@ jobs: - name: Run luals run: | export VIMRUNTIME="$(nvim --headless --cmd 'echo $VIMRUNTIME' +q 2>&1)" - ./build/luals/bin/lua-language-server --configpath=$(pwd)/.luarc.json --check=lsp/ --checklevel=Hint + ./build/luals/bin/lua-language-server --configpath=$(pwd)/.luarc.json --check=lsp/ --check=lua/lspconfig/types/lsp/ --checklevel=Hint stylua: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - - uses: JohnnyMorganz/stylua-action@v4 + - uses: JohnnyMorganz/stylua-action@v5 with: token: ${{ secrets.GITHUB_TOKEN }} version: latest @@ -57,7 +57,7 @@ jobs: steps: - uses: actions/checkout@v6 - run: pip install codespell - - run: codespell --quiet-level=2 --check-hidden --skip=./doc/configs.md,./doc/configs.txt --ignore-words=.codespellignorewords + - run: codespell --quiet-level=2 --check-hidden --skip=./doc/configs.md,./doc/configs.txt,./lua/lspconfig/types/lsp --ignore-words=.codespellignorewords commit: runs-on: ubuntu-latest diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2e92c3e1..a1f144b8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: neovim: true version: ${{ matrix.nvim_version }} - - uses: leafo/gh-actions-lua@v12 + - uses: leafo/gh-actions-lua@v13 with: luaVersion: "luajit-openresty" - uses: leafo/gh-actions-luarocks@v6 |
