Skip to content

Commit e294c4b

Browse files
committed
Add CircleCI script
1 parent 84b0d62 commit e294c4b

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

.circleci/config.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
version: 2
2+
jobs:
3+
build:
4+
working_directory: ~/repo
5+
machine: true
6+
7+
steps:
8+
- checkout
9+
- run:
10+
name: Set .env file
11+
command: |
12+
echo "AUTH0_DOMAIN=$domain" >> .env
13+
echo "AUTH0_AUDIENCE=$audience" >> .env
14+
15+
- run:
16+
name: background server
17+
command: sh exec.sh
18+
background: true
19+
20+
- run: sleep 20
21+
22+
- run:
23+
name: Clone script test
24+
command: git clone http://github.com/rafanog/test-script.git test
25+
26+
- run:
27+
name: Prepare environment variables for test
28+
command: |
29+
cd test
30+
echo "AUTH0_DOMAIN=$domain" >> .env
31+
echo "AUTH0_AUDIENCE=$audience" >> .env
32+
echo "AUTH0_CLIENT_ID_1=$id1" >> .env
33+
echo "AUTH0_CLIENT_SECRET_1=$secret1" >> .env
34+
echo "AUTH0_CLIENT_ID_2=$id2" >> .env
35+
echo "AUTH0_CLIENT_SECRET_2=$secret2" >> .env
36+
echo "AUTH0_CLIENT_ID_3=$id3" >> .env
37+
echo "AUTH0_CLIENT_SECRET_3=$secret3" >> .env
38+
echo "AUTH0_CLIENT_ID_4=$id4" >> .env
39+
echo "AUTH0_CLIENT_SECRET_4=$secret4" >> .env
40+
echo "API_URL=http://localhost:3010" >> .env
41+
42+
- run:
43+
name: Install test script dependency
44+
command: cd test && npm install && npm install asyncawait
45+
- run:
46+
name: Test
47+
command: cd test && npm test

0 commit comments

Comments
 (0)