Skip to content

T50470: push websocket updates upon saving models #591

T50470: push websocket updates upon saving models

T50470: push websocket updates upon saving models #591

Workflow file for this run

name: Continuous Integration
on: push
jobs:
check:
strategy:
matrix:
# Testing Python 3.7 (deb 10), Python 3.9 (deb 11), Python 3.11 (deb 12)
python-version: ["3.9", "3.11"]
django-version: ["3.2.25", "4.2.17", "5.1.4"]
database-engine: ["postgres", "mysql"]
os: [ubuntu-latest]
include:
# 3.7 cannot run on latest ubuntu
- python-version: 3.7
django-version: 3.2.25
database-engine: postgres
os: ubuntu-22.04
- python-version: 3.7
django-version: 3.2.25
database-engine: mysql
os: ubuntu-22.04
exclude:
- python-version: 3.9
django-version: 5.1.4
runs-on: ${{ matrix.os }}
services:
postgres:
image: postgres
env:
POSTGRES_HOST_AUTH_METHOD: trust
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
mysql:
image: mysql
env:
MYSQL_ROOT_PASSWORD: rootpassword
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 3306:3306
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install requirements
run: |
python -m venv .venv
.venv/bin/pip install django==${{ matrix.django-version }} -r ci-requirements.txt
- name: Run linting
run: .venv/bin/flake8 binder
- name: Prepare postgres database
run: |
psql -c 'CREATE DATABASE "binder-test";' -h localhost -U postgres
if: matrix.database-engine == 'postgres'
- name: Prepare mysql database
run: |
mysql --protocol=TCP -h localhost -u root -prootpassword -e 'CREATE DATABASE `binder-test`;'
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql --protocol=TCP -h localhost -u root -prootpassword mysql
if: matrix.database-engine == 'mysql'
- name: Run tests
run: |
.venv/bin/coverage run --include="binder/*" -m unittest discover -vt . -s tests
env:
BINDER_TEST_MYSQL: ${{ matrix.database-engine == 'mysql' && 1 || 0 }}
CY_RUNNING_INSIDE_CI: 1
- name: Upload coverage report
uses: codecov/codecov-action@v1