-
Notifications
You must be signed in to change notification settings - Fork 21
57 lines (54 loc) · 1.76 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
53
54
55
56
57
name: Acceptance tests
on:
- push
jobs:
build:
uses: ./.github/workflows/build.yml
test:
runs-on: ubuntu-latest
steps:
- name: Download sources
uses: actions/checkout@v4
- name: Download tools
run: |
cd backend
docker compose pull
docker pull benel/cucumber-capybara
- name: Install and launch backend with test data
run: |
cd backend
export COUCHDB_USER="TO_BE_CHANGED"
export COUCHDB_PASSWORD="TO_BE_CHANGED"
docker compose up -d
- name: Wait for backend
uses: docker://benel/wait-for-response:1
with:
args: http://localhost:5984/hyperglosae 401 5000 500
- name: Set the backend up
run: |
export COUCHDB_USER="TO_BE_CHANGED"
export COUCHDB_PASSWORD="TO_BE_CHANGED"
./backend/setup.sh
- name: Wait for frontend build
uses: lewagon/[email protected]
with:
check-name: build / build
ref: ${{ github.event.pull_request.head.sha || github.sha }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Get frontend build
uses: actions/download-artifact@v4
with:
name: frontend-build
path: frontend/build
- name: Start frontend
run: |
cd frontend
npm run preprod &
- name: Wait for frontend
uses: docker://benel/wait-for-response:1
with:
args: http://localhost:3000/ 200 30000 500
- name: Run tests
run:
docker run --rm -v "$(pwd)":/app --tty --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}"'