Skip to content

Commit

Permalink
ci: fix macos and windows tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HakonHarnes committed Dec 6, 2023
1 parent e305f1a commit 7a65268
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
nvim_version: ["stable", "nightly"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

- name: Install Neovim
shell: bash
run: |
mkdir -p /tmp/nvim
wget -q https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage -O /tmp/nvim/nvim.appimage
cd /tmp/nvim
chmod a+x ./nvim.appimage
./nvim.appimage --appimage-extract
echo "/tmp/nvim/squashfs-root/usr/bin/" >> $GITHUB_PATH
uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: ${{ matrix.nvim_version }}

- name: Run Tests
shell: bash
run: |
nvim --version
[ ! -d tests ] && exit 0
Expand Down
8 changes: 6 additions & 2 deletions tests/util_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ local util = require("img-clip.util")

describe("util", function()
it("can get the directory path from the file path", function()
local dir_path = util.get_dir_path_from_filepath("/home/user/project/image.png")
assert.same("/home/user/project/", dir_path)
local filepath = "/home/user/project/image.png"
filepath = vim.fn.resolve(filepath)

assert.same(false, filepath)
-- local dir_path = util.get_dir_path_from_filepath(filepath)
-- assert.same("/home/user/project/", dir_path)
end)
end)

0 comments on commit 7a65268

Please sign in to comment.