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 4dc837c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,13 @@ jobs:
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

- name: Run Tests
shell: bash
run: |
nvim --version
[ ! -d tests ] && exit 0
Expand Down
4 changes: 3 additions & 1 deletion tests/util_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ 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")
local filepath = "/home/user/project/image.png"
filepath = vim.fn.resolve(filepath)
local dir_path = util.get_dir_path_from_filepath(filepath)
assert.same("/home/user/project/", dir_path)
end)
end)

0 comments on commit 4dc837c

Please sign in to comment.