Update distribution setup. #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: django-pgallery build | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: Upgrade pip | |
run: pip install pip setuptools wheel --upgrade | |
- name: Install tox | |
run: pip install tox tox-gh-actions | |
- name: Install psql | |
run: | | |
sudo apt update | |
sudo apt install -y postgresql-client | |
- name: Create Postgres extension and DB | |
run: | | |
psql -c 'create extension hstore;' -U postgres -h localhost -d template1 | |
psql -c 'create database pgallery;' -U postgres -h localhost | |
env: | |
PGPASSWORD: postgres | |
- name: Run tox | |
run: python -m tox | |
env: | |
DATABASE_USER: postgres | |
DATABASE_PASSWORD: postgres |