Skip to content
This repository has been archived by the owner on Jul 7, 2020. It is now read-only.

Commit

Permalink
Add config.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
alexisluque committed Jun 26, 2018
1 parent b9f4afd commit 33ecd7a
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Common logic
defaults: &defaults
steps:
- attach_workspace:
at: ~/
- run:
name: Replace Auth0 test credentials
command: |
sed -i 's/{CLIENT_ID}/'$AUTH0_TEST_CLIENT_ID'/g' $AUTH0_CFG
sed -i 's/{DOMAIN}/'$AUTH0_TEST_DOMAIN'/g' $AUTH0_CFG
sed -i 's/{CLIENT_SECRET}/'$AUTH0_TEST_CLIENT_SECRET'/g' $AUTH0_CFG
- run:
name: Build pull request
command: |
cd $SAMPLE_PATH/
sh exec.sh
background: true
- run:
name: Wait for app to be available
command: |
sleep 80
docker run --network host --rm appropriate/curl --retry 8 --retry-connrefused -v localhost:3000/portal/home
- run:
name: Run tests
command: |
docker create --network host --name tester codeception/codeceptjs codeceptjs run-multiple --all --steps
docker cp $(pwd)/lock_login_test.js tester:/tests/lock_login_test.js
docker cp $(pwd)/codecept.conf.js tester:/tests/codecept.conf.js
docker start -i tester
working_directory: scripts
- run:
name: Copy app container logs
command: |
mkdir -p /tmp/out
docker logs $CIRCLE_SHA1 > /tmp/out/app_logs.log
docker cp tester:/tests/out /tmp/
when: on_fail
- store_artifacts:
path: /tmp/out

# Jobs and Workflows
version: 2
jobs:
checkout:
machine: true
steps:
- checkout
- run: git clone -b refactor-for-java https://github.com/alexisluque/spa-quickstarts-tests scripts
- persist_to_workspace:
root: ~/
paths:
- project
- scripts
01-login:
machine: true
environment:
- AUTH0_CFG: 01-Login/src/main/resources/auth0.properties
- SAMPLE_PATH: 01-Login
<<: *defaults

workflows:
version: 2
quickstarts_login:
jobs:
- checkout:
context: Quickstart Web App Test
- 01-login:
context: Quickstart Web App Test
requires:
- checkout

0 comments on commit 33ecd7a

Please sign in to comment.