Skip to content

Commit

Permalink
adding tests
Browse files Browse the repository at this point in the history
  • Loading branch information
luxus committed Oct 3, 2024
1 parent 2c4c49b commit 413b9e7
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# .github/workflows/ci.yml

name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
neovim-version: ["stable", "nightly"]
lua-version: ["5.1", "5.4"]

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

- name: Set up Lua
uses: leafo/gh-actions-lua@v9
with:
luaVersion: ${{ matrix['lua-version'] }}

- name: Set up Neovim
uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: ${{ matrix['neovim-version'] }}

- name: Install Dependencies
run: |
nvim --headless +'!mkdir -p ~/.local/share/nvim/site/pack/plugins/start' +qall
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim \
~/.local/share/nvim/site/pack/plugins/start/plenary.nvim
- name: Run Tests
run: |
nvim --headless \
-u tests/minimal_init.vim \
-c "PlenaryBustedDirectory tests/ { minimal_init = './tests/minimal_init.vim' }"
Empty file added tests/colorful_times_spec.lua
Empty file.
7 changes: 7 additions & 0 deletions tests/minimal_init.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
" tests/minimal_init.vim

set runtimepath+=.
set runtimepath+=~/.local/share/nvim/site/pack/plugins/start/plenary.nvim

" Load your plugin
runtime plugin/colorful-times.lua

0 comments on commit 413b9e7

Please sign in to comment.