Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
gorillamoe authored and iamxiaojianzheng committed Oct 24, 2024
1 parent 2a18dcb commit 69262a8
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ indent_style = space
indent_size = 2
charset = utf-8

[Makefile]
indent_style = tab

7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@ tag:
./scripts/tag.sh
release:
./scripts/tag.sh
docker-build:
if [ "$(OS)" != "linux" ] || [ "$(OS)" != "windows" ]; then (echo "OS must be either linux or windows"; exit 1); fi
docker build -t ghcr.io/mistweaverco/kulala-nvim-$(OS)-testrunner:latest tests/_dockerfiles/$(OS)
docker-push:
if [ "$(OS)" != "linux" ] || [ "$(OS)" != "windows" ]; then (echo "OS must be either linux or windows"; exit 1); fi
docker push ghcr.io/mistweaverco/kulala-nvim-$(OS)-testrunner:latest

35 changes: 35 additions & 0 deletions tests/_dockerfiles/ubuntu/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Kulala Neovim Linux Testrunner Docker Image

This is a docker image for running tests in a Linux environment.

It is based on the [ubuntu](https://hub.docker.com/_/ubuntu) image.

## Features

- `neovim` v0.10.2
- `stylua` v0.20.0
- `vale` v2.28.0
- `curl`
- `git`
- `gcc`
- `lua5.1`
- `luarocks`
- `unzip`
- `xclip` (for neovim clipboard support)
- `luarocks busted` (for running tests)

## Building the image

```bash
make docker-build OS=linux
```

## Pushing the image

> [!WARNING]
> You need to have write access to the docker registry at
> `ghcr.io/mistweaverco/kulala-nvim-linux-testrunner`.
```bash
make docker-push OS=windows
```
4 changes: 4 additions & 0 deletions tests/_dockerfiles/windows/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM mcr.microsoft.com/windows/nanoserver:ltsc2022

USER ContainerAdministrator
WORKDIR C:\\Users\\ContainerAdministrator\\AppData\\Local\\nvim
40 changes: 40 additions & 0 deletions tests/_dockerfiles/windows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Kulala Neovim Windows Testrunner Docker Image

This is a docker image for running tests in a Windows environment.

It is based on the [microsoft/windows-nanoserver](https://hub.docker.com/r/microsoft/windows-nanoserver) image.

## Features

- `neovim` v0.10.2
- `stylua` v0.20.0
- `vale` v2.28.0
- `curl`
- `git`
- `gcc`
- `lua5.1`
- `luarocks`
- `unzip`
- `luarocks busted` (for running tests)

## Building the image

> [!WARNING]
> You need to run the docker build command on
> a windows machine.
> It's a limitation of the windows docker images,
> provided by Microsoft, not us.
```bash
make docker-build OS=windows
```

## Pushing the image

> [!WARNING]
> You need to have write access to the docker registry at
> `ghcr.io/mistweaverco/kulala-nvim-windows-testrunner`.
```bash
make docker-push OS=windows
```

0 comments on commit 69262a8

Please sign in to comment.