Skip to content

Update django from 5.0.7 to 5.1 #253

Update django from 5.0.7 to 5.1

Update django from 5.0.7 to 5.1 #253

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Build
on:
push:
branches: [ "*" ]
jobs:
pg-build:
runs-on: ubuntu-latest
env:
TOX_DB_NAME: letsagree
TOX_DB_USER: postgres
TOX_DB_PASSWD: ${{ secrets.PG_PASS }}
TOX_DB_ENGINE: django.db.backends.postgresql
services:
postgres:
image: postgres:latest
env:
POSTGRES_PASSWORD: ${{ secrets.PG_PASS }}
POSTGRES_USER: postgres
POSTGRES_DB:: letsagree
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
strategy:
max-parallel: 4
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"] # CHECK
django-version: ["Django>=3.2,<3.3", "Django>=4.1"] # CHECK
django_settings: ["test_setup.settings", "test_setup.i18n_settings"] # CHECK
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install "${{ matrix.django-version }}"
python -m pip install django-translated-fields pytest-django pytest-cov pytest-factoryboy psycopg2-binary
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: set pythonpath
run: |
echo "PYTHONPATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV
- name: Test with pytest
run: |
pytest -rs --nomigrations --cov --cov-branch
env:
DJANGO_SETTINGS_MODULE: ${{ matrix.django_settings }}
TOX_DB_PORT: 5432
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Testing
github-token: ${{ secrets.GITHUB_TOKEN }}
mdb-build:
runs-on: ubuntu-latest
env:
TOX_DB_NAME: letsagree
TOX_DB_USER: root
TOX_DB_PASSWD: ${{ secrets.PG_PASS }}
TOX_DB_ENGINE: django.db.backends.mysql
services:
mariadb:
image: mariadb:latest
env:
MARIADB_USER: root
MYSQL_ROOT_PASSWORD: ${{ secrets.PG_PASS }}
MYSQL_DATABASE: letsagree
ports:
- 3306:3306
options: >-
--health-cmd="healthcheck.sh --innodb_initialized"
--health-interval=10s
--health-timeout=5s
--health-retries=3
strategy:
max-parallel: 4
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"] # CHECK
django-version: ["Django>=3.2,<3.3", "Django>=4.1"] # CHECK
django_settings: ["test_setup.settings", "test_setup.i18n_settings"] # CHECK
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install "${{ matrix.django-version }}"
python -m pip install django-translated-fields pytest-django pytest-cov pytest-factoryboy mysqlclient
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: set pythonpath
run: |
echo "PYTHONPATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV
- name: Test with pytest
run: |
pytest -rs --nomigrations --cov --cov-branch
env:
DJANGO_SETTINGS_MODULE: ${{ matrix.django_settings }}
TOX_DB_PORT: 3306
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Testing
github-token: ${{ secrets.GITHUB_TOKEN }}
coveralls_finish:
needs: [pg-build, mdb-build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.11" # CHECK
- name: Install last pass dependencies
run: |
python -m pip install black flake8 bandit
- name: Run Last Checks
run: |
black . --check
flake8 .
bandit letsagree/*
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true
github-token: ${{ secrets.GITHUB_TOKEN }}