diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 468488d..f6be1a4 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -33,7 +33,7 @@ jobs: tox test: - name: Run tests (SQLite) + name: Run tests runs-on: ubuntu-latest strategy: @@ -58,37 +58,39 @@ jobs: pip install tox tox - test-pg: - name: Run tests (PostgreSQL) - runs-on: ubuntu-latest - - services: - postgres: - image: postgres - env: - POSTGRES_DB: postgres - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - ports: - - 5432:5432 - # Set health checks to wait until postgres has started - options: >- - --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - - env: - DATABASE_URL: postgres://postgres:postgres@postgres:5432/postgres - - steps: - - name: Check out the repository - uses: actions/checkout@v3 - - - name: Set up Python 3.11 - uses: actions/setup-python@v4 - with: - python-version: "3.11" - - - name: Install tox - run: pip install tox - - - name: Run tox (pg-only) - run: tox -e pg-only +# HRB: no longer required (SQLite supports UUID generation), but keeping +# around for future self. +# test-pg: +# name: Run tests (PostgreSQL) +# runs-on: ubuntu-latest + +# services: +# postgres: +# image: postgres +# env: +# POSTGRES_DB: postgres +# POSTGRES_USER: postgres +# POSTGRES_PASSWORD: postgres +# ports: +# - 5432:5432 +# # Set health checks to wait until postgres has started +# options: >- +# --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + +# env: +# DATABASE_URL: postgres://postgres:postgres@postgres:5432/postgres + +# steps: +# - name: Check out the repository +# uses: actions/checkout@v3 + +# - name: Set up Python 3.11 +# uses: actions/setup-python@v4 +# with: +# python-version: "3.11" + +# - name: Install tox +# run: pip install tox + +# - name: Run tox (pg-only) +# run: tox -e pg-only diff --git a/tox.ini b/tox.ini index 63e9a21..a615a51 100644 --- a/tox.ini +++ b/tox.ini @@ -10,6 +10,7 @@ envlist = [testenv] deps = coverage + dj_database_url pytest pytest-cov pytest-django @@ -22,14 +23,6 @@ deps = commands = pytest --cov=anonymiser --verbose --ds={env:DJANGO_SETTINGS_MODULE} tests/ -[testenv:pg-only] -deps = - dj_database_url - pytest - pytest-django - psycopg2-binary - django - commands = pytest --verbose -s --ds=tests.settings_postgres tests/