Skip to content

Commit

Permalink
Merge pull request #228 from saxix/github-actions
Browse files Browse the repository at this point in the history
github actions
  • Loading branch information
saxix committed Oct 20, 2021
2 parents ed57718 + 1910831 commit 87d658d
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 5 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Test

on:
push:
branches:
- master
- develop
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2

- name: Install dependencies
run: |
python -m pip install --upgrade pip tox
- name: Lint with flake8
run: |
tox -e lint
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.8", "3.9", "3.10"]
django-version: [ "2.2", "3.1", "3.2" ]
db-engine: [pg, mysql]
env:
PY_VER: ${{ matrix.python-version}}
DJ_VER: ${{ matrix.django-version}}
DB_ENG: ${{ matrix.db-engine}}

services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: concurrency
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: python -m pip install --upgrade pip tox

- name: Test with
run: tox -e d${DJ_VER//.}-py${PY_VER//.}-pg

- uses: codecov/codecov-action@v1
with:
verbose: true
6 changes: 6 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Release 2.4
-----------
* add support Django 4
* add support Python 3.10


Release 2.3
-----------
* Removes code producing DeprecationError
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def run_tests(self):
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Topic :: Software Development :: Libraries :: Application Frameworks',
'Topic :: Software Development :: Libraries :: Python Modules',
],
Expand Down
4 changes: 2 additions & 2 deletions tests/demoapp/demo/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': dbname,
'HOST': '127.0.0.1',
'PORT': '',
'PORT': '5432',
'USER': 'postgres',
'PASSWORD': ''}}
'PASSWORD': 'postgres'}}
elif db == 'mysql':
DATABASES = {
'default': {
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = d{30,31,32}-py{38,39}-{pg,sqlite,mysql}
envlist = d{22,31,32}-py{38,39,310}-{pg,sqlite,mysql}


[pytest]
Expand Down Expand Up @@ -57,10 +57,10 @@ deps =
pypy-pg: psycopg2cffi
mysql: mysqlclient
docs: -rdocs/requirements.pip
d30: django==3.0.*
d22: django==2.2.*
d31: django==3.1.*
d32: django==3.2.*
; d4: django==4.0.*
; d40: django==4.0.*


commands =
Expand Down

0 comments on commit 87d658d

Please sign in to comment.