Add postgresql

This commit is contained in:
Friedrich Lindenberg 2020-03-15 13:29:39 +01:00
parent 7749574264
commit dd286b33da
2 changed files with 19 additions and 1 deletions

View File

@ -5,6 +5,19 @@ on: [push]
jobs: jobs:
python: python:
runs-on: ubuntu-latest runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: dataset
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Show ref - name: Show ref
@ -25,6 +38,11 @@ jobs:
DATABASE_URI: 'sqlite:///:memory:' DATABASE_URI: 'sqlite:///:memory:'
run: | run: |
make test make test
- name: Run PostgreSQL tests
env:
DATABASE_URI: 'postgresql+psycopg2://postgres:postgres@postgres/dataset'
run: |
make test
- name: Build a distribution - name: Build a distribution
run: | run: |
python setup.py sdist bdist_wheel python setup.py sdist bdist_wheel

View File

@ -1,7 +1,7 @@
dataset: databases for lazy people dataset: databases for lazy people
================================== ==================================
[![Build Status](https://api.travis-ci.org/pudo/dataset.png)](https://travis-ci.org/pudo/dataset) ![build](https://github.com/pudo/dataset/workflows/build/badge.svg)
In short, **dataset** makes reading and writing data in databases as simple as reading and writing JSON files. In short, **dataset** makes reading and writing data in databases as simple as reading and writing JSON files.