Skip to content

Commit

Permalink
Add initial workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
MisanthropicBit committed Feb 8, 2024
1 parent 6173fa1 commit 7cacde1
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/luarocks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: LuaRocks release

on:
push:
tags:
- 'v*'
pull_request: # Will test a local install without uploading to luarocks.org

jobs:
luarocks-release:
runs-on: ubuntu-latest
name: LuaRocks upload
steps:
- name: Lint
uses: leafo/gh-actions-luarocks@v4.0.0
run: luarocks lint neotest-busted-scm-1.rockspec
- name: Checkout
uses: actions/checkout@v3
- name: Test and upload
uses: nvim-neorocks/luarocks-tag-release@v5
env:
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Create release

on:
push:
tags:
- 'v*'

jobs:
release:
name: release
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Create github release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
fail_on_unmatched_files: true
prerelease: ${{ contains(github.ref, '-') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 18 additions & 0 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Style check

on:
push:
branches:
- master
pull_request: ~

jobs:
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: JohnnyMorganz/stylua-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: 0.16.1
args: --check lua/ tests/
37 changes: 37 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Tests

on:
pull_request: ~
push:
branches:
- master

jobs:
tests:
name: Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
neovim_version: ['v0.9.0', 'nightly']

steps:
- uses: actions/checkout@v3
- run: date +%F > todays-date
- name: Restore cache for today's nightly.
uses: actions/cache@v2
with:
path: _neovim
key: ${{ runner.os }}-x64-${{ hashFiles('todays-date') }}
- name: Prepare test dependencies
run: |
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim
git clone --depth 1 https://github.com/nvim-neotest/neotest ~/.local/share/nvim/site/pack/vendor/start/neotest
ln -s "$(pwd)" ~/.local/share/nvim/site/pack/vendor/start
- name: Setup neovim
uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: ${{ matrix.neovim_version }}
- name: Run tests
run: ./tests/run_tests.sh

0 comments on commit 7cacde1

Please sign in to comment.