Skip to content

Add CI Workflows for Automatic Tests #3

Add CI Workflows for Automatic Tests

Add CI Workflows for Automatic Tests #3

Workflow file for this run

name: Multi-OS Complete Test
on:
push:
branches:
- dev/master
- master
pull_request:
branches:
- dev/master
- master
env:
DJANGO_SETTINGS_MODULE: 'genui.settings.test'
jobs:
tests-all:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: [ '3.10', '3.11', '3.12' ]
fail-fast: false
defaults:
run:
shell: bash
services:
postgres:
image: informaticsmatters/rdkit-cartridge-debian:latest
env:
POSTGRES_USER: genui
POSTGRES_PASSWORD: genui
POSTGRES_DB: genui
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@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Environment
run: |
python -m pip cache purge
pip install .[dev]
- name: Check Environment Info
run: |
python -m pip freeze
python -c "print('Python version: ' + '$(python --version)')"
python -c "import platform; print('System info: ', platform.system(), platform.release())"
python -c "import genui; print('GenUI version:', genui.__version__)"
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure() # always run even if the previous step fails
with:
report_paths: 'testing/test_pytest/test_report.xml'
- name: Run migrations
run: cd src && python manage.py migrate
- name: Run tests
run: py.test -xv src/