-
Notifications
You must be signed in to change notification settings - Fork 165
52 lines (49 loc) · 1.62 KB
/
tests.yml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Acceptance tests
on:
- push
- pull_request
jobs:
build:
uses: ./.github/workflows/build.yml
test:
runs-on: ubuntu-latest
steps:
- name: Download Porphyry
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- name: Download Argos
run: |
wget https://github.com/Hypertopic/Argos/archive/v4.zip
unzip v4.zip
- name: Install and launch Argos with proxy and test data
run: |
cd Argos-4
docker-compose up -d
cd ..
- name: Wait for Argos
uses: nev7n/wait_for_response@v1
with:
url: http://localhost
responseCode: 200
- name: Create test user
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: Get Porphyry build
uses: actions/download-artifact@v3
with:
name: porphyry-build
path: build
- name: Start Porphyry
run: npm run preprod &
- name: Wait for Porphyry
uses: nev7n/wait_for_response@v1
with:
url: http://localhost:3000/
responseCode: 200
- 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}"'