forked from Hypertopic/Porphyry
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (39 loc) · 1.37 KB
/
tests.yml
File metadata and controls
39 lines (39 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Acceptance tests
on:
- push
- pull_request
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install and run Argos with proxy and test data
run: |
wget https://github.com/Hypertopic/Argos/archive/v4.zip
unzip v4.zip
cd Argos-4
docker-compose up -d
cd ..
- uses: nev7n/wait_for_response@v1
with:
url: http://localhost
responseCode: 200
- name: Create test users
run: |
curl --silent -X PUT localhost:5984/_users
curl --silent -X PUT localhost:5984/_users/org.couchdb.user:alice -H 'Accept:application/json' -H 'Content-Type:application/json' -d '{"name":"alice", "password":"whiterabbit", "roles":[], "type":"user"}'
- name: Install Porphyry
run: |
npm install
npm run build
- name: Start Porphyry
run: npm run preprod &
- uses: nev7n/wait_for_response@v1
with:
url: http://localhost:3000/
responseCode: 200
- name: Install test tools
run: docker pull benel/cucumber-capybara
- name: Run tests
run : docker run --rm -v "$(pwd)":/app -t --net="host" --env APP_HOST="http://`hostname`:3000" benel/cucumber-capybara --retry 2 --fail-fast --no-source --no-snippets
shell: 'script -q -e -c "bash {0}"'