From dd286b33da39a755b803b31c3fa2ac006642c6e8 Mon Sep 17 00:00:00 2001 From: Friedrich Lindenberg Date: Sun, 15 Mar 2020 13:29:39 +0100 Subject: [PATCH] Add postgresql --- .github/workflows/build.yml | 18 ++++++++++++++++++ README.md | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d7bc51b..1c803af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,19 @@ on: [push] jobs: python: 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: - uses: actions/checkout@v1 - name: Show ref @@ -25,6 +38,11 @@ jobs: DATABASE_URI: 'sqlite:///:memory:' run: | make test + - name: Run PostgreSQL tests + env: + DATABASE_URI: 'postgresql+psycopg2://postgres:postgres@postgres/dataset' + run: | + make test - name: Build a distribution run: | python setup.py sdist bdist_wheel diff --git a/README.md b/README.md index 9f22ae1..2ae51f8 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ 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.