Feat: Sort Discussions by File Name (#102)

This MR adds the ability to sort discussions by file name, rather than just by date.

This is an optional configuration that can be passed in on startup. The MR also introduces a test suite for the Lua code that runs through Neovim, so that the plugin can be fully tested with required dependencies and APIs.

Major props to @johnybx for the hard work on this change!
This commit is contained in:
johnybx
2023-12-04 23:03:32 +01:00
committed by GitHub
parent 63cbf41221
commit 02db3e4b0e
22 changed files with 1458 additions and 232 deletions

View File

@@ -1,15 +0,0 @@
name: Lua Tests
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run Busted
uses: lunarmodules/busted@v2.2.0
# with:
# args: --run=api

View File

@@ -5,7 +5,7 @@ on:
- main
jobs:
lua_lint:
name: Lint Lua 💅
name: Lint Lua 💅
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -15,7 +15,7 @@ jobs:
with:
args: --globals vim --no-max-line-length -- .
lua_format:
name: Formatting Lua 💅
name: Formatting Lua 💅
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -27,11 +27,29 @@ jobs:
version: latest
args: --check .
lua_test:
name: Test Lua 🧪
needs: [lua_format,lua_lint]
name: Run tests 🧪
strategy:
matrix:
nvim_version: [stable, nightly]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run Busted
uses: lunarmodules/busted@v2.2.0
uses: actions/checkout@v4
- name: Install neovim
uses: rhysd/action-setup-vim@v1
id: vim
with:
neovim: true
version: ${{ matrix.nvim_version }}
- name: Install luajit
uses: leafo/gh-actions-lua@v10
with:
luaVersion: "luajit-2.1.0-beta3"
- name: Install luarocks
uses: leafo/gh-actions-luarocks@v4
- name: Run tests
shell: bash
run: |
chmod +x lua-test.sh
./lua-test.sh