Skip to content

Commit

Permalink
Merge pull request #69 from avatarnewyork/php53beta
Browse files Browse the repository at this point in the history
Php53beta
  • Loading branch information
mrpatrick committed Jan 14, 2016
2 parents 75f25fd + ae87916 commit f9d6623
Show file tree
Hide file tree
Showing 14 changed files with 440 additions and 214 deletions.
59 changes: 39 additions & 20 deletions circle.yml
@@ -1,41 +1,60 @@
machine:
ruby:
version: rbx-2.2.6
version: rbx-2.2.10
services:
- docker

dependencies:
override:
- sudo pip install --upgrade docker-compose==1.2.0
- bundle install

# ngrock /ghostinspector real request
- unzip -d ~/ ~/$CIRCLE_PROJECT_REPONAME/ngrok_2.0.19_linux_amd64.zip
post:
# remove any cached files - cache seems to cause issues
- rm -rf ~/.gradle
- rm -rf ~/.bundle
- rm -rf ~/.cache/bower
- rm -rf ~/.go_workspace
- rm -rf ~/.ivy2
- rm -rf ~/.m2
- rm -rf ~/dockerenv_apache/vendor/bundle
- rm -rf ~/virtualenvs
test:
override:
- docker-compose -f docker-compose.yml run web /.composer/vendor/phpunit/phpunit/phpunit /var/www/html/:
- bash:
parallel: true
files:
- testrunners/*.sh
timeout: 1200
- rake spec:
timeout: 1200
# start apache in background
- docker-compose -f docker-compose.yml up -d
# ngrock /ghostinspector real request
- wget https://dl.ngrok.com/ngrok_2.0.17_linux_amd64.zip
- unzip ngrok_2.0.17_linux_amd64.zip
- ./ngrok authtoken $NGROK_TOKEN
- ./ngrok http -subdomain=$CIRCLE_SHA1 8888:
background: true
# Wait for application and ngrok to be ready
- curl --retry 10 --retry-delay 10 -v https://$CIRCLE_SHA1.ngrok.io
# Execute Ghost Inspector tests using the ngrok tunnel
- curl "https://api.ghostinspector.com/v1/suites/$GHOST_SUITE_ID/execute/?apiKey=$GHOST_API_KEY&startUrl=https://$CIRCLE_SHA1.ngrok.io" > $CIRCLE_ARTIFACTS/ghostinspector.json
- if [ $(grep -c '"passing":false' $CIRCLE_ARTIFACTS/ghostinspector.json) -ne 0 ]; then exit 1; fi

post:
- mkdir -p $CIRCLE_TEST_REPORTS/junit/
- find . -type f -name "results.xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;

deployment:
production:
branch: [master, php53, php53beta, php55beta]
php55beta:
branch: [php55beta]
commands:
- ./deploy.sh
master:
branch: [master]
commands:
- ./deploy.sh
php56beta:
branch: [php56beta]
commands:
- ./deploy.sh
php56:
branch: [php56]
commands:
- ./deploy.sh
php53beta:
branch: [php53beta]
commands:
- ./deploy.sh
php53:
branch: [php53]
commands:
- ./deploy.sh

2 changes: 1 addition & 1 deletion deploy.sh
@@ -1,3 +1,3 @@
#!/bin/bash

curl -H "Content-Type: application/json" --data '{"build": true}' -X POST $DOCKERHUB_TRIGGER_URL
curl -H "Content-Type: application/json" --data '{"source_type": "Branch", "source_name": "'$CIRCLE_BRANCH'"}' -X POST $DOCKERHUB_TRIGGER_URL
Binary file added ngrok_2.0.19_linux_amd64.zip
Binary file not shown.

0 comments on commit f9d6623

Please sign in to comment.