{"id":19508066,"url":"https://github.com/vimjas/vim-testbed","last_synced_at":"2025-10-25T21:07:56.952Z","repository":{"id":47156466,"uuid":"51972323","full_name":"Vimjas/vim-testbed","owner":"Vimjas","description":"Docker image for testing Vim plugins","archived":false,"fork":false,"pushed_at":"2023-10-01T03:22:03.000Z","size":86,"stargazers_count":43,"open_issues_count":12,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-26T02:52:22.445Z","etag":null,"topics":["dockerfile","test-automation","testing-tools","vim"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vimjas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-02-18T02:28:25.000Z","updated_at":"2024-12-01T04:32:58.000Z","dependencies_parsed_at":"2024-11-10T23:03:34.399Z","dependency_job_id":null,"html_url":"https://github.com/Vimjas/vim-testbed","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Vimjas/vim-testbed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vimjas%2Fvim-testbed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vimjas%2Fvim-testbed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vimjas%2Fvim-testbed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vimjas%2Fvim-testbed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vimjas","download_url":"https://codeload.github.com/Vimjas/vim-testbed/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vimjas%2Fvim-testbed/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262667270,"owners_count":23345525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dockerfile","test-automation","testing-tools","vim"],"created_at":"2024-11-10T23:03:29.318Z","updated_at":"2025-10-25T21:07:56.858Z","avatar_url":"https://github.com/Vimjas.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vim Testbed\n\n[![Build Status](https://github.com/Vimjas/vim-testbed/actions/workflows/ci.yml/badge.svg?branch=master\u0026event=push)](https://github.com/Vimjas/vim-testbed/actions?query=branch%3Amaster+event%3Apush)\n[![](https://badge.imagelayers.io/testbed/vim:latest.svg)](https://imagelayers.io/?images=testbed/vim:latest)\n\nBecause unit testing a Vim plugin is a pain in the ass.\n\n[vader.vim](https://github.com/junegunn/vader.vim) provides a pretty\nstraightforward way to test Vim plugins.  But, you'll only be testing on the\nversion of Vim you have installed.  Then there's the issue of running automated\ntests with CI where you have to either:\n\n- Build Vim from source which takes an eternity, then run your tests.\n- Use the version that comes pre-installed which means you're only testing\n  your plugin's ability to run on some specific, possibly older version.\n\nWith this base image, you can build the versions you need and reuse them in\nfuture tests.\n\n## Usage\n\nThe README is a work in progress.  Take a look in the `example` directory and\n[ubuntu-vims](https://github.com/tweekmonster/ubuntu-vims).\n\nYou will need to create your own Dockerfile, build an image, then push it to\nyour [Docker Hub](https://hub.docker.com/) repository.\n\n### Dockerfile\n\n```Dockerfile\nFROM testbed/vim:latest\n\nRUN install_vim -tag v7.3.429 -name vim73 -py -build \\\n                -tag v7.4.052 -name vim74-trusty -build \\\n                -tag master -py2 -py3 -ruby -lua -build \\\n                -tag neovim:v0.2.0 -py2 -py3 -ruby -build \\\n                -tag neovim:master -py2 -py3 -ruby -build\n\n```\n\nThe `install_vim` script builds one or more versions of Vim that you would like\nto use for testing.  Each version should be terminated with a `-build` flag to\ntell the script to start a build.\n\nThe following flags are available for each build:\n\nFlag | Description\n---- | -----------\n`-tag` | The Vim/Neovim release.  It should be a valid tag/commit hash, with an optional GitHub repo prefix.  E.g. `master`, `neovim:master`, `neovim:v0.1.7`, or `username/neovim:branch`.\n`-flavor` | The Vim flavor.  Either `vim` (default) or `neovim`.  If empty, it will be detected from `-tag`.\n`-name` | The name to use for the binary's symlink.  It defaults to `$FLAVOR-$TAG`, e.g. `vim-master` or `neovim-v0.1.7`.\n`-py`/`py2` | Build with Python 2.\n`-py3` | Build with Python 3.\n`-ruby` | Build with Ruby.\n`-lua` | Build with Lua (implied with Neovim 0.2.1+).\n\nWith `-flavor vim` (the default), all other arguments (up until `-build`) get\npassed through to `./configure`, e.g. `--disable-FEATURE` etc.\n\n### Build\n\n```shell\ndocker build -t \"your/repository\" .\n```\n\nFrom here you can run your tests locally (as described below), push it to your\nDocker Hub repository, or setup an [automated build](https://docs.docker.com/docker-hub/builds/).\n\n### Run\n\n```shell\ndocker run -it --rm -v $PWD:/testplugin -v $PWD/test:/home \"your/repository\" vim74 '+Vader! test/*'\n```\n\nThe entry point for the container is a script that runs the named Vim version.\nIn this case `vim74`.  Arguments after the name is passed to Vim.\n\nThe entry point script prefixes your arguments with `-u /home/vimtest/vimrc -i NONE`.\nThey can be overridden with your arguments.\n\n## Setup\n\nThe base image is created with automated testing in mind.  It is not meant to\nbe built every time you run tests.  An unprivileged user `vimtest` is used to\nrun Vim to prevent files from being written back to your work directory.  This\nmeans that it won't be able to download/install plugins into a mapped volume.\n\nTo deal with this, your test `vimrc` could add known paths within the container\nto `rtp`, and your `Dockerfile` could install the plugins into that location.\n\n### /rtp.vim\n\nThis image provides a helper script that should be sourced at the top of your\nvimrc:\n\n```vim\nsource /rtp.vim\n```\n\nIt will add `/home/vimtest/vim` and `/home/vimtest/vim/after` to the runtime\npath, and search for plugins in `/home/vimtest/plugins`.\n\n### Volumes\n\nTwo volumes are provided:\n\nVolume | Description\n------ | -----------\n/home | The user directory.\n/testplugin | The directory for your plugin.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvimjas%2Fvim-testbed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvimjas%2Fvim-testbed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvimjas%2Fvim-testbed/lists"}