Skip to content

Commit

Permalink
Merge pull request #5 from polarmutex/v2
Browse files Browse the repository at this point in the history
feat: v2 of  git-worktree
  • Loading branch information
polarmutex committed Jul 18, 2024
2 parents b6f0631 + 0ff9f71 commit 03e6aad
Show file tree
Hide file tree
Showing 76 changed files with 2,205 additions and 2,603 deletions.
7 changes: 4 additions & 3 deletions .busted
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
return {
_all = {
coverage = false,
lpath = "lua/?.lua;lua/?/init.lua",
lpath = 'lua/?.lua;lua/?/init.lua',
lua = 'nlua',
},
default = {
verbose = true
verbose = true,
},
tests = {
verbose = true
verbose = true,
},
}
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
57 changes: 0 additions & 57 deletions .github/workflows/ci.yml

This file was deleted.

14 changes: 14 additions & 0 deletions .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Conventional Commits

on:
pull_request:
branches: [ main ]

jobs:
build:
name: Conventional Commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: webiny/[email protected]

22 changes: 17 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
name: LuaRocks release
name: Release
on:
push:
tags: # Will upload to luarocks.org when a tag is pushed
tags:
- "*"
pull_request: # Will test a local install without uploading to luarocks.org
pull_request:

jobs:
luarocks-release:
runs-on: ubuntu-latest
name: LuaRocks upload
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Fail if changelog entry does not exist
if: startsWith(github.ref, 'refs/tags/')
run: grep -q "${{ github.ref_name }}" CHANGELOG.md
- name: LuaRocks Upload
uses: nvim-neorocks/luarocks-tag-release@v5
uses: nvim-neorocks/luarocks-tag-release@v7
env:
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
with:
detailed_description: |
A plugin that helps to use git worktree operations, create, switch, and delete in neovim.
- name: GitHub Release
if: startsWith(github.ref, 'refs/tags/')
uses: ncipollo/release-action@v1
with:
bodyFile: "CHANGELOG.md"
allowUpdates: true
20 changes: 20 additions & 0 deletions .github/workflows/style-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
---
name: Style checking
on:
pull_request: ~
push:
branches:
- main

jobs:
stylua:
name: stylua
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --color always --check lua/
22 changes: 22 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: 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 }}
19 changes: 19 additions & 0 deletions .github/workflows/type-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Type Check
on:
pull_request: ~
push:
branches:
- main

jobs:
build:
name: Type Check Code Base
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Type Check Code Base
uses: mrcjkb/lua-typecheck-action@v1
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.zshrc.bak
.direnv
.pre-commit-config.yaml
minimal.vim
result
9 changes: 9 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
globals = {
'vim',
'describe',
'it',
'before_each',
'after_each',
'assert',
'async',
}
1 change: 1 addition & 0 deletions .luarc.json
6 changes: 6 additions & 0 deletions .stylua.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
line_endings = "Unix"
indent_type = "Spaces"
indent_width = 4
quote_style = "AutoPreferSingle"
call_parentheses = "NoSingleTable"
collapse_simple_statement = "Never"
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
.PHONY: lint
lint:
luacheck ./lua

# GIT_WORKTREE_NVIM_LOG=fatal
.PHONY: test
test:
GIT_WORKTREE_NVIM_LOG=fatal nvim --headless --noplugin -u tests/minimal_init.vim -c "PlenaryBustedDirectory tests/ { minimal_init = './tests/minimal_init.vim' }"
# minimal.vim is generated when entering the flake, aka `nix develop`
nvim --headless -u minimal.vim -c "lua require('plenary.test_harness').test_directory('.', {minimal_init='minimal.vim'})"

.PHONY: wintest
wintest:
vusted --output=gtest -m '.\plenary\lua\?.lua' -m '.\plenary\lua\?\?.lua' -m '.\plenary\lua\?\init.lua' ./lua
Loading

0 comments on commit 03e6aad

Please sign in to comment.