Skip to content

ci: replace Travis CI with GH Actions #7

ci: replace Travis CI with GH Actions

ci: replace Travis CI with GH Actions #7

Workflow file for this run

name: Test Drs-filer API Endpoints
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, 3.10]
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 ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- 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