Add Dockerfile for running tests

make docker
make docker-test
This commit is contained in:
Junegunn Choi 2018-06-01 18:23:25 +09:00
parent 68ec3d1c10
commit 76a2dcb5a9
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627
2 changed files with 20 additions and 1 deletions

11
Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM archlinux/base:latest
RUN pacman -Sy && pacman --noconfirm -S awk tar git curl tmux zsh fish ruby procps
RUN gem install --no-ri --no-rdoc minitest
RUN echo '. /usr/share/bash-completion/completions/git' >> ~/.bashrc
RUN echo '. ~/.bashrc' >> ~/.bash_profile
# Do not set default PS1
RUN rm -f /etc/bash.bashrc
COPY . /fzf
RUN /fzf/install --all
CMD tmux new 'ruby /fzf/test/test_go.rb > out && touch ok' && cat out && [ -e ok ]

View File

@ -128,4 +128,12 @@ target/$(BINARYARM8): $(SOURCES) vendor
bin/fzf: target/$(BINARY) | bin
cp -f target/$(BINARY) bin/fzf
.PHONY: all release release-all test install clean
docker:
docker build -t fzf-arch .
docker run -it fzf-arch tmux
docker-test:
docker build -t fzf-arch .
docker run -it fzf-arch
.PHONY: all release release-all test install clean docker docker-test