Skip to content

Commit

Permalink
try custom image for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gorillamoe committed Sep 7, 2024
1 parent 6458b8c commit c45535f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ jobs:
tests:
name: Tests
runs-on: ${{ matrix.os }}
container:
image: ${{ matrix.container }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
- os: ubuntu-latest
container: gorillamoe/ubuntu-with-libfuse2:latest
rev: v0.10.0/nvim.appimage
steps:
- uses: actions/checkout@v4
Expand All @@ -24,12 +27,10 @@ jobs:
path: |
_neovim
~/.local/share/nvim/site/pack/vendor/start
key: ${{ runner.os }}-${{ matrix.rev }}
key: ${{ runner.os }}-${{ matrix.container }}-${{ matrix.rev }}

- name: Prepare dependencies
run: | # TODO: Cache apt dependencies
sudo apt-get update && sudo apt-get install -y libfuse2
./scripts/tests.sh prepare ${{ matrix.rev }}
run: ./scripts/tests.sh prepare ${{ matrix.rev }}

- name: Run tests
run: ./scripts/tests.sh run
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Used for running tests in CI
FROM ubuntu:latest

RUN apt-get update && apt-get upgrade -y && apt-get install -y libfuse2 curl git kmod linux-generic
RUN depmod -a
RUN modprobe fuse
2 changes: 1 addition & 1 deletion scripts/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ NVIM_DL_BASE="https://github.com/neovim/neovim/releases/download/"

prepare() {
local version=$1

modprobe fuse
if [[ ! -f _neovim/nvim ]] && [[ -n $version ]]; then
mkdir -p _neovim && curl -sL -o _neovim/nvim "${NVIM_DL_BASE}${version}" && chmod +x _neovim/nvim
_neovim/nvim --headless -c 'TSInstallSync lua | quit'
Expand Down

0 comments on commit c45535f

Please sign in to comment.