diff --git a/.gitea/workflows/pull_request.yaml b/.gitea/workflows/pull_request.yaml index a9599d0..d1e38eb 100644 --- a/.gitea/workflows/pull_request.yaml +++ b/.gitea/workflows/pull_request.yaml @@ -31,5 +31,7 @@ jobs: run: stylua --check . - name: Lint run: lua-language-server --check=. + - name: Bootstrap plenary.nvim + run: git clone --depth 1 https://github.com/nvim-lua/plenary.nvim .tests/vendor/plenary.nvim - name: Test run: nvim --headless -c "PlenaryBustedDirectory tests/watchexec/ {minimal_init = 'tests/minimal_init.lua'}" -c "q" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..40ec2f8 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.tests/vendor/ diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 548bd62..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule ".tests/vendor/plenary.nvim"] - path = .tests/vendor/plenary.nvim - url = https://github.com/nvim-lua/plenary.nvim diff --git a/.tests/vendor/plenary.nvim b/.tests/vendor/plenary.nvim deleted file mode 160000 index 74b06c6..0000000 --- a/.tests/vendor/plenary.nvim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 74b06c6c75e4eeb3108ec01852001636d85a932b diff --git a/run_checks.ps1 b/run_checks.ps1 index 33614e5..04ae53f 100644 --- a/run_checks.ps1 +++ b/run_checks.ps1 @@ -21,6 +21,14 @@ if ($LASTEXITCODE -ne 0) { Write-Host "PASS" -ForegroundColor Green +$plenaryPath = ".tests/vendor/plenary.nvim" + +if (-not (Test-Path $plenaryPath)) { + Write-Host "Bootstrapping plenary.nvim for tests..." -ForegroundColor Yellow + New-Item -ItemType Directory -Path ".tests/vendor" -Force | Out-Null + git clone --depth 1 https://github.com/nvim-lua/plenary.nvim $plenaryPath +} + Write-Host "`n=== Test ===" nvim --headless -c "PlenaryBustedDirectory tests/watchexec/ {minimal_init = 'tests/minimal_init.lua'}" diff --git a/run_tests.ps1 b/run_tests.ps1 index f3d421c..3242efc 100644 --- a/run_tests.ps1 +++ b/run_tests.ps1 @@ -1 +1,9 @@ +$plenaryPath = ".tests/vendor/plenary.nvim" + +if (-not (Test-Path $plenaryPath)) { + Write-Host "Bootstrapping plenary.nvim for tests..." -ForegroundColor Yellow + New-Item -ItemType Directory -Path ".tests/vendor" -Force | Out-Null + git clone --depth 1 https://github.com/nvim-lua/plenary.nvim $plenaryPath +} + nvim --headless -c "PlenaryBustedDirectory tests/watchexec/ {minimal_init = 'tests/minimal_init.lua'}"