diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 0d08e261..5ace4600 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,11 +1,6 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file - version: 2 updates: - - package-ecosystem: "github-actions" # See documentation for possible values - directory: "/" # Location of package manifests + - package-ecosystem: "github-actions" + directory: "/" schedule: interval: "weekly" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 925727e20..96993304 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,78 +1,14 @@ name: CI + on: push: + branches: [main, master] pull_request: jobs: - stylua: - name: Stylua Formatting - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: JohnnyMorganz/stylua-action@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - version: latest - args: --check . - tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install Neovim - shell: bash - run: | - mkdir -p /tmp/nvim - wget -q https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage -O /tmp/nvim/nvim.appimage - cd /tmp/nvim - chmod a+x ./nvim.appimage - ./nvim.appimage --appimage-extract - echo "/tmp/nvim/squashfs-root/usr/bin/" >> $GITHUB_PATH - - name: Run Tests - run: | - nvim --version - [ ! -d tests ] && exit 0 - ./tests/run - docs: - runs-on: ubuntu-latest - needs: tests - if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'LazyVim' }} - steps: - - uses: actions/checkout@v4 - - name: panvimdoc - uses: kdheepak/panvimdoc@main - with: - vimdoc: LazyVim - version: "Neovim >= 0.9.0" - demojify: true - treesitter: true - - name: Push changes - uses: stefanzweifel/git-auto-commit-action@v5 - 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] " - release: - name: release - if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'LazyVim' }} - needs: - - docs - - tests - runs-on: ubuntu-latest - steps: - - uses: googleapis/release-please-action@v4 - id: release - with: - config-file: .github/release-please-config.json - manifest-file: .github/.release-please-manifest.json - - uses: actions/checkout@v4 - - name: tag stable versions - if: ${{ steps.release.outputs.release_created }} - run: | - git config user.name github-actions[bot] - git config user.email github-actions[bot]@users.noreply.github.com - git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git" - git tag -d stable || true - git push origin :stable || true - git tag -a stable -m "Last Stable Release" - git push origin stable + ci: + uses: folke/github/.github/workflows/ci.yml@main + secrets: inherit + with: + plugin: LazyVim + repo: LazyVim/LazyVim diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 52474c6a..0908727b 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -1,12 +1,8 @@ -name: "Pull Request Labeler" +name: "PR Labeler" on: - pull_request_target jobs: labeler: - permissions: - contents: read - pull-requests: write - runs-on: ubuntu-latest - steps: - - uses: actions/labeler@v5 + uses: folke/github/.github/workflows/labeler.yml@main + secrets: inherit diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 0401a4d8..6d9df366 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,4 +1,4 @@ -name: "Lint PR" +name: PR Title on: pull_request_target: @@ -6,36 +6,13 @@ on: - opened - edited - synchronize + - reopened + - ready_for_review permissions: pull-requests: read jobs: - main: - name: Validate PR title - runs-on: ubuntu-latest - steps: - - uses: amannn/action-semantic-pull-request@v5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - requireScope: true - subjectPattern: ^(?![A-Z]).+$ - scopes: | - .+ - types: | - build - chore - ci - docs - feat - fix - merge - perf - refactor - revert - style - test - wip - ignoreLabels: | - autorelease: pending + pr-title: + uses: folke/github/.github/workflows/pr.yml@main + secrets: inherit diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 9ebbb312..a0c704be 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,27 +1,10 @@ -name: Close stale issues and PRs +name: Stale Issues & PRs on: - workflow_dispatch: schedule: - cron: "30 1 * * *" jobs: - stale: - runs-on: ubuntu-latest - steps: - - uses: actions/stale@v9 - with: - operations-per-run: 300 - # default stale time - days-before-stale: 30 - days-before-close: 7 - # never stale pull requests - # days-before-pr-stale: -1 - days-before-pr-close: -1 - # exclude issues with certain labels - exempt-issue-labels: pinned,wip,security,notice - # never stale issues attached to a milestone - # exempt-all-milestones: true - stale-issue-message: "This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days." - stale-pr-message: "This PR is stale because it has been open 60 days with no activity." - close-issue-message: "This issue was closed because it has been stalled for 7 days with no activity." + ci: + uses: folke/github/.github/workflows/stale.yml@main + secrets: inherit diff --git a/.gitignore b/.gitignore index cc5457ab..9e2d3592 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,7 @@ tt.* +foo.* .tests doc/tags debug .repro -foo.* *.log -data diff --git a/scripts/test b/scripts/test new file mode 100755 index 00000000..4baf6215 --- /dev/null +++ b/scripts/test @@ -0,0 +1,3 @@ +#!/bin/env bash + +nvim -l tests/minit.lua --busted tests -o utfTerminal "$@" diff --git a/selene.toml b/selene.toml new file mode 100644 index 00000000..5867a2a2 --- /dev/null +++ b/selene.toml @@ -0,0 +1,4 @@ +std="vim" + +[lints] +mixed_table="allow" diff --git a/tests/run b/tests/run deleted file mode 100755 index 8db9d516..00000000 --- a/tests/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -nvim -l tests/minit.lua --busted tests -o utfTerminal diff --git a/vim.toml b/vim.toml new file mode 100644 index 00000000..df7e67e6 --- /dev/null +++ b/vim.toml @@ -0,0 +1,21 @@ +[selene] +base = "lua51" +name = "vim" + +[vim] +any = true + +[jit] +any = true + +[assert] +any = true + +[describe] +any = true + +[it] +any = true + +[before_each.args] +any = true