Skip to content
Snippets Groups Projects
Commit d6a9fae7 authored by Rambaud Pierrick's avatar Rambaud Pierrick
Browse files

refactor: keep one single CI

parent a8464b24
No related branches found
No related tags found
No related merge requests found
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
# https://github.com/ymyzk/tox-gh-actions
name: CI Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
services:
eralchemy-db:
image: postgres:alpine
env:
POSTGRES_DB: eralchemy
POSTGRES_PASSWORD: eralchemy
POSTGRES_PORT: 5432
POSTGRES_USER: eralchemy
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Clone this repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up pg-client and graphviz
run: |
sudo apt-get update
sudo apt-get -qq install graphviz python3-dev libgraphviz-dev pkg-config postgresql-client
- name: Setup database schema
run: psql -h localhost -U eralchemy -c 'CREATE SCHEMA eralchemy_test;'
env:
PGPASSWORD: eralchemy
- name: Install python test dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
- name: Test with pytest and tox
run: tox
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment