Skip to content

Commit

Permalink
added Docker'ised dev env support
Browse files Browse the repository at this point in the history
  • Loading branch information
costa committed Aug 3, 2024
1 parent 3de8af1 commit da68dcf
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ Contributing
- ```rake acceptance```
- ```pronto run```

Alternatively, if you're in a [Docker](https://www.docker.com)ised environment,
don't care about installing anything locally, and don't really need __pronto__
-- just run `bin/test` instead.

8. Commit your changes
- ```git commit -am "Your commit message"```

Expand Down
11 changes: 11 additions & 0 deletions bin/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash -e
test "$#" -ne 0 && echo "Unsupported args: $@" >&2 && exit 145
cd "$( dirname "${BASH_SOURCE[0]}" )"/..

export COMPOSE_FILE=test/docker-compose.yml
export COMPOSE_PROJECT_NAME=highline_dev

docker-compose rm -svf
docker-compose build --force-rm

docker-compose run --rm tester && docker-compose rm -svf || ( docker-compose logs && exit 1 )
15 changes: 15 additions & 0 deletions test/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM ruby

WORKDIR /highline


RUN bash -ec 'apt update; apt -y install cmake'

ADD Gemfile highline.gemspec .git* ./
ADD lib/highline/version.rb ./lib/highline/version.rb
RUN bundle install

ADD . .

ENTRYPOINT ["bundle", "exec"]
CMD ["bash", "-ec", "rake test; rake acceptance"]
6 changes: 6 additions & 0 deletions test/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: '2.1'
services:
tester:
build:
context: ..
dockerfile: test/Dockerfile

0 comments on commit da68dcf

Please sign in to comment.