changed the way that the tests run, by running on top of a native ruby image, which allows other docker-compose files to overwrite the setting

This commit is contained in:
HoneyryderChuck 2018-02-13 23:39:41 +00:00
parent af15faeb19
commit 41b5c53fb2
9 changed files with 44 additions and 34 deletions

4
docker-compose-2.1.yml Normal file
View File

@ -0,0 +1,4 @@
version: '3'
services:
httpx:
image: ruby:2.1-alpine

4
docker-compose-2.2.yml Normal file
View File

@ -0,0 +1,4 @@
version: '3'
services:
httpx:
image: ruby:2.2-alpine

4
docker-compose-2.3.yml Normal file
View File

@ -0,0 +1,4 @@
version: '3'
services:
httpx:
image: ruby:2.3-alpine

4
docker-compose-2.4.yml Normal file
View File

@ -0,0 +1,4 @@
version: '3'
services:
httpx:
image: ruby:2.4-alpine

4
docker-compose-2.5.yml Normal file
View File

@ -0,0 +1,4 @@
version: '3'
services:
httpx:
image: ruby:2.5-alpine

View File

@ -0,0 +1,4 @@
version: '3'
services:
httpx:
image: jruby:9.1.15-alpine

View File

@ -2,29 +2,26 @@ version: '3'
services:
httpx:
environment:
- SSL_CERT_FILE=/httpx/test/support/ci/certs/ca-bundle.crt
- SSL_CERT_FILE=/home/test/support/ci/certs/ca-bundle.crt
- HTTPBIN_HOST=nghttp2
- HTTPX_HTTP_PROXY=http://http_proxy:3128
- HTTPX_HTTPS_PROXY=http://http_proxy:3128
- HTTPX_SOCKS4_PROXY=socks4://socks_proxy:8080
- HTTPX_SOCKS4A_PROXY=socks4a://socks_proxy:8080
- HTTPX_SOCKS5_PROXY=socks5://socks_proxy:8080
- HTTPX_HTTP_PROXY=http://httpproxy:3128
- HTTPX_HTTPS_PROXY=http://httpproxy:3128
- HTTPX_SOCKS4_PROXY=socks4://socksproxy:8080
- HTTPX_SOCKS4A_PROXY=socks4a://socksproxy:8080
- HTTPX_SOCKS5_PROXY=socks5://socksproxy:8080
- PARALLEL=1
- CI=1
build:
context: .
dockerfile: test/support/ci/Dockerfile
image: ruby:2.4-alpine
depends_on:
- http_proxy
- socks_proxy
- httpproxy
- socksproxy
- nghttp2
volumes:
- ./lib:/httpx/lib
- ./test:/httpx/test
command:
"rake test:ci"
- ./:/home
entrypoint:
/home/test/support/ci/build.sh
socks_proxy:
socksproxy:
image: qautomatron/docker-3proxy
ports:
- "8080:8080"
@ -32,7 +29,7 @@ services:
volumes:
- ./test/support/ci:/etc/3proxy
http_proxy:
httpproxy:
image: sameersbn/squid:3.3.8-23
ports:
- "3128:3128"

View File

@ -1,17 +0,0 @@
FROM ruby:2.4-alpine
RUN apk update && apk upgrade && \
apk add --no-cache g++ make git bash
RUN mkdir -p /httpx/lib/httpx
WORKDIR /httpx
COPY Gemfile Gemfile
COPY httpx.gemspec httpx.gemspec
COPY lib/httpx/version.rb lib/httpx/version.rb
RUN bundle install
COPY . .
ENTRYPOINT ["bundle", "exec"]

6
test/support/ci/build.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
apk update && apk upgrade
apk add --no-cache g++ make git bash
cd /home && rm Gemfile.lock && bundle install && bundle exec rake test:ci