diff --git a/.editorconfig b/.editorconfig index ee8bbd1a..d442aac1 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,3 +6,6 @@ indent_style = space indent_size = 2 charset = utf-8 +[Makefile] +indent_style = tab + diff --git a/Makefile b/Makefile index 876a81ea..10176117 100644 --- a/Makefile +++ b/Makefile @@ -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 + diff --git a/tests/_dockerfiles/ubuntu/README.md b/tests/_dockerfiles/ubuntu/README.md new file mode 100644 index 00000000..de1e8396 --- /dev/null +++ b/tests/_dockerfiles/ubuntu/README.md @@ -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 +``` diff --git a/tests/_dockerfiles/windows/Dockerfile b/tests/_dockerfiles/windows/Dockerfile new file mode 100644 index 00000000..064b502e --- /dev/null +++ b/tests/_dockerfiles/windows/Dockerfile @@ -0,0 +1,4 @@ +FROM mcr.microsoft.com/windows/nanoserver:ltsc2022 + +USER ContainerAdministrator +WORKDIR C:\\Users\\ContainerAdministrator\\AppData\\Local\\nvim diff --git a/tests/_dockerfiles/windows/README.md b/tests/_dockerfiles/windows/README.md new file mode 100644 index 00000000..6462c474 --- /dev/null +++ b/tests/_dockerfiles/windows/README.md @@ -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 +```