Skip to content

Commit

Permalink
Adjusted CI
Browse files Browse the repository at this point in the history
  • Loading branch information
davenquinn committed Mar 27, 2024
1 parent 9aab5d5 commit d25cf06
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@ jobs:
ci:
name: Continuous integration tests
runs-on: ubuntu-latest
services:
# Label used to access the service container
postgis:
# Docker Hub image
image: postgis/postgis:16-3.4-alpine
# Provide the password for postgres
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready --health-interval 10s --health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
steps:
- uses: actions/checkout@v4
- name: Install Python
Expand All @@ -32,16 +47,7 @@ jobs:
- name: Install the project dependencies
run: poetry install
# Create a PostGIS database (in a Docker container) for tests
- name: Start the PostGIS Docker container
run:
docker run --name postgis -e POSTGRES_PASSWORD=postgres -d -p
5432:5432 postgis/postgis:16-3.4-alpine
- name: Run the automated tests
run: make test
env:
TOPO_TESTING_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/mapboard_topology_test
- name: Stop the PostGIS Docker container
if: always()
run: |
docker stop postgis
docker rm postgis

0 comments on commit d25cf06

Please sign in to comment.