Clarify OMF licenses for issue #47 #162
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
- push | |
- pull_request | |
jobs: | |
job_init: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Python setup | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12.3' | |
- name: Dependencies installation | |
run: | | |
python -m pip install --upgrade pip | |
if [[ "${{ runner.os }}" != "Windows" ]]; then | |
sed -i '/pywin32/d' Requirements/requirements.txt | |
fi | |
python -m pip install -r Requirements/requirements.txt | |
- name: Docker setup | |
run: docker compose up -d --wait | |
- name: Wait for PostgreSQL to be ready (2 min maximum) | |
run: | | |
MAX_RETRIES=6 | |
RETRY_COUNT=0 | |
until docker compose exec pgrouting pg_isready -U postgres -d pgrouting || [ $RETRY_COUNT -eq $MAX_RETRIES ]; do | |
echo "Waiting for PostgreSQL to be ready..." | |
sleep 5 | |
RETRY_COUNT=$((RETRY_COUNT+1)) | |
done | |
if [ $RETRY_COUNT -eq $MAX_RETRIES ]; then | |
echo "PostgreSQL did not become ready in time." >&2 | |
exit 1 | |
fi | |
- name: Run tests | |
run: pytest -v |