From 68630eac54f444bdf0f2328906522532d10a3d4f Mon Sep 17 00:00:00 2001 From: Brian Ryall Date: Thu, 18 Jul 2024 11:21:31 -0400 Subject: [PATCH] ci: add bused tests --- .github/workflows/ci.yml | 58 ------------------------------- .github/workflows/commit_lint.yml | 13 ------- .github/workflows/release.yml | 18 ---------- .github/workflows/tests.yml | 22 ++++++++++++ 4 files changed, 22 insertions(+), 89 deletions(-) delete mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/commit_lint.yml delete mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index b56f962..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: test - -on: - pull_request: - -jobs: - test: - name: Run Test - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - steps: - - uses: actions/checkout@v4 - - uses: rhysd/action-setup-vim@v1 - id: vim - with: - neovim: true - version: nightly - - - name: luajit - uses: leafo/gh-actions-lua@v10 - with: - luaVersion: "luajit-2.1.0-beta3" - - - uses: notomo/action-setup-nvim-lua@v1 - - run: luarocks install vusted - - run: luarocks install luacheck - - - name: install plenary.nvim - if: matrix.os != 'windows-latest' - run: | - git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary - - - name: install plenary.nvim on windows - if: matrix.os == 'windows-latest' - run: | - git clone --depth 1 https://github.com/nvim-lua/plenary.nvim .\plenary - ls .\plenary - ls .\plenary\lua - - - name: Run tests - if: matrix.os != 'windows-latest' - shell: bash - env: - VUSTED_NVIM: ${{ steps.vim.outputs.executable }} - VUSTED_ARGS: "--headless" - run: | - make test - - - name: Run tests - if: matrix.os == 'windows-latest' - shell: bash - env: - VUSTED_NVIM: ${{ steps.vim.outputs.executable }} - VUSTED_ARGS: "--headless" - run: | - make wintest diff --git a/.github/workflows/commit_lint.yml b/.github/workflows/commit_lint.yml deleted file mode 100644 index 1e5b5d8..0000000 --- a/.github/workflows/commit_lint.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: commit-lint -on: [pull_request] -jobs: - lint-commits: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - run: npm install --save-dev @commitlint/{cli,config-conventional} - - run: | - echo "module.exports = { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js - - run: npx commitlint --from HEAD~1 --to HEAD --verbose diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index a711b65..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: LuaRocks release -on: - push: - tags: # Will upload to luarocks.org when a tag is pushed - - "*" - pull_request: # Will test a local install without uploading to luarocks.org - -jobs: - luarocks-release: - runs-on: ubuntu-latest - name: LuaRocks upload - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: LuaRocks Upload - uses: nvim-neorocks/luarocks-tag-release@v5 - env: - LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..59d4fc3 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,22 @@ +--- +name: Run tests +on: + pull_request: ~ + push: + branches: + - main + +jobs: + build: + name: Run tests + runs-on: ubuntu-latest + strategy: + matrix: + neovim_version: ["nightly", "stable"] + + steps: + - uses: actions/checkout@v4 + - name: Run tests + uses: nvim-neorocks/nvim-busted-action@v1 + with: + nvim_version: ${{ matrix.neovim_version }}