-
Notifications
You must be signed in to change notification settings - Fork 3
58 lines (47 loc) · 1.57 KB
/
docker_compose_test.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
58
name: docker-compose-test
on: [ push, pull_request ]
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: setup Python
with:
python-version: 3.8
- name: Install dependencies
working-directory: docker_compose_test
run: |
python3 -m pip install --upgrade pip
pip3 install -r requirements.txt
- name: Docker Compose up -d --build
working-directory: docker_compose_test
run:
docker-compose up -d --build
- name: Wait for service to be ready
run: sleep 45
- name: publish stations
working-directory: docker_compose_test
run: |
docker exec -t wis2box-api-test-wis2box-management wis2box metadata station publish-collection
- name: Check status code API
working-directory: docker_compose_test
run: |
status_code=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:4343/oapi)
if [[ $status_code -ne 200 ]]; then
echo "Request failed with status code $status_code"
exit 1
fi
- name: test synop publish
working-directory: docker_compose_test
run: |
python3 test_synop_publish.py
- name: test csv publish
working-directory: docker_compose_test
run: |
python3 test_csv_publish.py
- name: failed tests 🚩
working-directory: docker_compose_test
if: ${{ failure() }}
run: |
docker-compose logs