Updated workflows.

- Added `create-release.yml` workflow.
- Renamed `pythonpackage.yml` to `test-package.yml`.
This commit is contained in:
Fabio Caccamo
2021-12-22 21:56:47 +01:00
parent 042e93a84b
commit c9f0795a95
2 changed files with 31 additions and 2 deletions
+47
View File
@@ -0,0 +1,47 @@
name: Test package
on:
- push
- pull_request
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['2.7', '3.6', '3.7', '3.8', '3.9', '3.10']
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
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: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install psycopg2 prerequisites
run: sudo apt-get install libpq-dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-test.txt
pip install tox tox-gh-actions
- name: Test with tox
run: tox