feat: check DB file has been changed #362
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
- push | |
- pull_request | |
jobs: | |
test: | |
name: Run tests | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
version: | |
- v0.9.2 | |
- v0.9.1 | |
- v0.9.0 | |
- nightly | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Checkout plenary.nvim | |
uses: actions/checkout@v3 | |
with: | |
#repository: nvim-lua/plenary.nvim | |
repository: delphinus/plenary.nvim | |
path: plenary.nvim | |
- name: Checkout telescope.nvim | |
uses: actions/checkout@v3 | |
with: | |
repository: nvim-telescope/telescope.nvim | |
path: telescope.nvim | |
- name: Checkout sqlite.lua | |
uses: actions/checkout@v3 | |
with: | |
repository: kkharji/sqlite.lua | |
path: sqlite.lua | |
- name: Install Neovim | |
uses: rhysd/action-setup-vim@v1 | |
id: nvim | |
with: | |
neovim: true | |
version: ${{ matrix.version }} | |
- name: Run tests | |
env: | |
PLENARY_PATH: plenary.nvim | |
TELESCOPE_PATH: telescope.nvim | |
SQLITE_PATH: sqlite.lua | |
DEBUG_PLENARY: 1 | |
EXE: ${{ steps.nvim.outputs.executable }} | |
run: |- | |
TEST_DIR=lua/frecency/tests/ | |
MINIMAL_LUA=${TEST_DIR}minimal.lua | |
NVIM=$(perl -e '$_ = $ENV{EXE}; s,\\,/,g; print') | |
$NVIM --headless --clean -u $MINIMAL_LUA -c "PlenaryBustedDirectory $TEST_DIR {minimal_init = '$MINIMAL_LUA'}" | |
if: matrix.os != 'windows-latest' | |
- name: Run tests | |
shell: bash | |
env: | |
PLENARY_PATH: plenary.nvim | |
TELESCOPE_PATH: telescope.nvim | |
SQLITE_PATH: sqlite.lua | |
DEBUG_PLENARY: 1 | |
EXE: ${{ steps.nvim.outputs.executable }} | |
run: |- | |
TEST_DIR=lua/frecency/tests/ | |
MINIMAL_LUA=${TEST_DIR}minimal.lua | |
NVIM=$(perl -e '$_ = $ENV{EXE}; s,\\,/,g; print') | |
# TODO: PlenaryBustedDirectory seems not to run on Windows | |
$NVIM --headless --clean -u $MINIMAL_LUA -c "PlenaryBustedFile $TEST_DIR/recency_spec.lua" | |
$NVIM --headless --clean -u $MINIMAL_LUA -c "PlenaryBustedFile $TEST_DIR/migrator_spec.lua" | |
$NVIM --headless --clean -u $MINIMAL_LUA -c "PlenaryBustedFile $TEST_DIR/frecency_spec.lua" | |
$NVIM --headless --clean -u $MINIMAL_LUA -c "PlenaryBustedFile $TEST_DIR/file_lock_spec.lua" | |
if: matrix.os == 'windows-latest' | |
- name: Type Check Code Base | |
uses: mrcjkb/[email protected] | |
with: | |
checkLevel: Hint | |
configpath: .luarc.json | |
# NOTE: This step needs nix that seems not to work with SIP (macOS) | |
if: matrix.os == 'ubuntu-latest' |