From 29b61643f52d6a3447bdf3a9c77f01776b17fe81 Mon Sep 17 00:00:00 2001 From: Kakeru Ishii Date: Sun, 5 Nov 2017 20:14:16 +0900 Subject: [PATCH] fix: add e2e testing --- circle.yml | 12 +++++++----- shell/e2e.sh | 2 ++ 2 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 shell/e2e.sh diff --git a/circle.yml b/circle.yml index 6928c5e98..d02316394 100644 --- a/circle.yml +++ b/circle.yml @@ -1,18 +1,20 @@ machine: node: version: 6.9.5 - test: post: - sh release.sh - - aws s3 cp ./coverage/ s3://coverage.grimoire.gl/core/$CIRCLE_BRANCH --recursive --region ap-northeast-1 --acl public-read + - >- + aws s3 cp ./coverage/ s3://coverage.grimoire.gl/core/$CIRCLE_BRANCH + --recursive --region ap-northeast-1 --acl public-read override: - npm run lint && npm run build && npm run coverage - - aws s3 cp ./register/ s3://ci.grimoire.gl/js/grimoirejs/${CIRCLE_BRANCH}_${CIRCLE_BUILD_NUM} --recursive --region ap-northeast-1 --acl public-read - + - sh -x shell/e2e.sh deployment: deploy: branch: master commands: - npm run doc - - aws s3 cp ./docs/ s3://api.grimoire.gl/core --recursive --region ap-northeast-1 --acl public-read + - >- + aws s3 cp ./docs/ s3://api.grimoire.gl/core --recursive --region + ap-northeast-1 --acl public-read diff --git a/shell/e2e.sh b/shell/e2e.sh new file mode 100644 index 000000000..15479b1b0 --- /dev/null +++ b/shell/e2e.sh @@ -0,0 +1,2 @@ +aws s3 cp register/ s3://$S3_BUCKET_URL/js/$CIRCLE_SHA1 --recursive --acl public-read +curl -X POST -d "repositoryURL=$CIRCLE_REPOSITORY_URL" -d "currentBranch=$CIRCLE_BRANCH" -d "currentBuildNumber=$CIRCLE_BUILD_NUM" -d "previousBuildNumber=$CIRCLE_PREVIOUS_BUILD_NUM" -d "sha1=$CIRCLE_SHA1" -d "pullRequest=$CI_PULL_REQUEST" $E2E_TRIGGER \ No newline at end of file