-
Notifications
You must be signed in to change notification settings - Fork 8
45 lines (36 loc) · 1.12 KB
/
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
name: Test Drs-filer API Endpoints
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Build and run Docker Compose
run: docker compose up --build -d
- name: Wait for the services to be ready
run: |
echo "Waiting for the services to be ready..."
for i in {1..10}; do
if curl -sSf http://localhost:8080/ga4gh/drs/v1 > /dev/null; then
echo "Service is up!"
break
fi
echo "Waiting for the service to be ready..."
sleep 3
done
- name: Set up Python
uses: actions/[email protected]
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest requests
- name: Test with pytest
run: |
pytest tests/test.py -v -p no:warnings
env:
DRS_FILER_URL: http://localhost:8080/ga4gh/drs/v1
- name: Stop and remove Docker Compose services
run: docker compose down