Skip to content

Update docker-compose.yml #55

Update docker-compose.yml

Update docker-compose.yml #55

Workflow file for this run

name: tests
on:
pull_request:
branches:
- master
paths-ignore:
- ".gitignore"
- "**.md"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
services:
postgres:
image: kartoza/postgis:14
env:
POSTGRES_USER: admin
POSTGRES_PASS: admin
POSTGRES_DB: gis_test
ALLOW_IP_RANGE: 0.0.0.0/0
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
redis:
image: redis:6.2
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.12
uses: actions/setup-python@v2
with:
python-version: "3.12"
- name: Install and set up Poetry
run: |
curl -sSL https://install.python-poetry.org | python
$HOME/.local/bin/poetry config virtualenvs.in-project true
- name: Cache dependencies.py
uses: actions/cache@v2
with:
path: .venv
key: venv-3.12-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies.py
run: |
$HOME/.local/bin/poetry install
- name: Install osmium & osmctools
run: |
sudo apt-get update
sudo apt-get install -y -qq osmium-tool osmctools
echo $(osmium --version)
- name: linting
run: |
source .venv/bin/activate
pre-commit run --all-files
- name: pytest and coverage
run: |
source .venv/bin/activate
sudo python -m smtpd -n -c DebuggingServer localhost:1025 &
sudo docker volume create routing-packager_packages --driver local --opt type=none --opt device=$PWD --opt o=bind &
sudo docker volume create routing-packager_tmp_data --driver local --opt type=none --opt device=$PWD --opt o=bind
export API_CONFIG=test
pytest --cov=routing_packager_app --ignore=tests/test_tasks.py
coverage lcov --include "routing_packager_app/*"
- name: coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./coverage.lcov