Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[107] Add Instructions and Script To Run postgis Tests #118

Merged
merged 3 commits into from
Oct 13, 2020

Conversation

timjklein36
Copy link
Collaborator

@timjklein36 timjklein36 commented Oct 13, 2020

What

Fixes #107.

Instructions for running postgres and postgis tests locally have been added to CONTRIBUTING.md. The instructions explain a way to run the tests against a database that is run using docker.

A script, postgis-tests.sh, has been added to do the heavy lifting for the user (once the dependencies have been installed). It may be desired to turn that into a make target in the future.

Why

This provides a clean and reproduceable way to run the postgres and postgis specific tests locally.

How

Follow the instructions in the CONTRIBUTING.md file. Comment on this PR if anything does not work or is missing.

- Instructions are in CONTRIBUTING.md

- Script is in root: `postgis-tests.sh`
Copy link
Contributor

@anapaulagomes anapaulagomes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me but I still have to test it locally to make sure that is working fine. 👍🏽
Thanks for your contribution, @timjklein36!

CONTRIBUTING.md Outdated Show resolved Hide resolved
`spn` -> `spin`

Co-authored-by: Ana Paula Gomes <[email protected]>
Copy link
Member

@berinhard berinhard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is great! @anapaulagomes I tested it locally and it worked just fine. I'm a debian user, so that worked for me. But it would be interesting to review this PR in other distros/OS, such as macOS. Can you help us too @amureki ?

python -m pytest

# Spin down the postgis container
docker stop modelbakery
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

@amureki
Copy link
Collaborator

amureki commented Oct 13, 2020

Sure, I can also take a look to see how it works on MacOS. And thank you very much @timjklein36 for your contribution!

Copy link
Collaborator

@amureki amureki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This setup worked well for me!

@berinhard berinhard merged commit 362d662 into model-bakers:main Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make it easier to run unit tests againts Postgres and Postgis
5 participants