Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pinning Docker Compose version for Travis in order to avoid intermittent Docker errors #466

Merged
merged 7 commits into from
Oct 30, 2024
15 changes: 8 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,27 @@ before_install:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
before_script:
- mkdir -p ~/.docker/cli-plugins/ && curl -SL https://github.com/docker/compose/releases/download/v2.30.1/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose && chmod +x ~/.docker/cli-plugins/docker-compose && docker compose version
- ./cc-test-reporter before-build
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker-compose build --pull
- docker-compose -f docker-compose.yml -f docker-test.yml up -d
- docker-compose logs -t -f &
- docker compose build
- docker compose -f docker-compose.yml -f docker-test.yml up -d
- docker compose logs -t -f &
- echo "Waiting for Elasticsearch indexes..." && until curl --silent --fail -I "http://localhost:9200/alegre_similarity_test"; do sleep 1; done
- until curl --silent --fail -I "http://localhost:3100"; do sleep 1; done
- echo "Waiting for model servers..." && while [[ ! '2' =~ $(redis-cli -n 1 SCARD 'SharedModel') ]]; do sleep 1; done
#comment until fix timeout curl: (28) Operation timed out
# - docker-compose exec alegre bash -c "curl --max-time 600.0 -OL https://raw.githubusercontent.com/meedan/check-api/develop/spec/pacts/check_api-alegre.json"
# - docker compose exec alegre bash -c "curl --max-time 600.0 -OL https://raw.githubusercontent.com/meedan/check-api/develop/spec/pacts/check_api-alegre.json"
jobs:
include:
- stage: tests
name: unit-tests
script: docker-compose exec alegre make test
script: docker compose exec alegre make test
- stage: tests
name: contract-testing
script: docker-compose exec alegre make contract_testing
script: docker compose exec alegre make contract_testing
after_script:
- docker-compose exec alegre coverage xml
- docker compose exec alegre coverage xml
- if [[ "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_JOB_NAME" != "contract-testing" ]]; then ./cc-test-reporter after-build -t coverage.py -r $CC_TEST_REPORTER_ID --exit-code $TRAVIS_TEST_RESULT; fi
notifications:
slack:
Expand Down
Loading