-
Notifications
You must be signed in to change notification settings - Fork 485
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move build env to github actions, use django-jsonfield-backport
- Loading branch information
Showing
12 changed files
with
195 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
name: Test and deploy | ||
|
||
# define when to run the action | ||
on: | ||
- push | ||
- pull_request | ||
|
||
env: | ||
GITHUB_WORKFLOW: true | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-20.04 | ||
|
||
# test matrix | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: | ||
- 3.6 | ||
- 3.7 | ||
- 3.8 | ||
- 3.9 | ||
django: | ||
- 2.2 | ||
- 3.0 | ||
- 3.1 | ||
database: | ||
- sqlite | ||
- mysql | ||
- postgres | ||
|
||
# additional service containers to run | ||
services: | ||
# postgres service | ||
postgres: | ||
# docker hub image | ||
image: postgres:9.5-alpine | ||
# configure the instance | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: postgres | ||
ports: | ||
- 5432:5432 | ||
# set health checks to wait until service has started | ||
options: >- | ||
--health-cmd="pg_isready" | ||
--health-interval=10s | ||
--health-timeout=5s | ||
--health-retries=5 | ||
# mysql service | ||
mysql: | ||
# docker hub image | ||
image: mysql:5.7 | ||
# configure the instance | ||
env: | ||
MYSQL_ALLOW_EMPTY_PASSWORD: yes | ||
MYSQL_DATABASE: test | ||
ports: | ||
- 3306:3306 | ||
# set health checks to wait until service has started | ||
options: >- | ||
--health-cmd="mysqladmin ping" | ||
--health-interval=10s | ||
--health-timeout=5s | ||
--health-retries=5 | ||
steps: | ||
# check out revision to test | ||
- uses: actions/checkout@v2 | ||
|
||
# install python | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
# upgrade pip | ||
- name: Update pip | ||
run: python -m pip install --upgrade pip | ||
|
||
# install environment specific dependencies | ||
- name: Install coverage | ||
run: pip install coverage>=5.3 | ||
- name: Install Django 2.2 | ||
if: matrix.django == 2.2 | ||
run: pip install "Django>=2.2,<3.0" | ||
- name: Install Django 3.0 | ||
if: matrix.django == 3.0 | ||
run: pip install "Django>=3.0,<3.1" | ||
- name: Install Django 3.1 | ||
if: matrix.django == 3.1 | ||
run: pip install "Django>=3.1,<3.2" | ||
- name: Install MySQL libs | ||
if: matrix.database == 'mysql' | ||
run: pip install mysqlclient>=2.0.1 django-mysql>=3.9.0 | ||
- name: Install postgres libs | ||
if: matrix.database == 'postgres' | ||
run: pip install psycopg2>=2.8.6 | ||
- name: Install django-jsonfield-backport | ||
if: matrix.django == 2.2 || matrix.django == 3.0 | ||
run: pip install "django-jsonfield-backport>=1.0.2,<2.0" | ||
|
||
# install our package | ||
- name: Install package | ||
run: pip install -e . | ||
|
||
# execute the tests | ||
- name: Run tests | ||
run: coverage run runtests/manage.py test -v3 --noinput actstream testapp testapp_nested | ||
env: | ||
DATABASE_ENGINE: ${{ matrix.database }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
Django>=1.11 | ||
Sphinx | ||
git+https://github.com/justquick/alabaster.git#egg=alabaster | ||
django-jsonfield>=1.0.1 | ||
django-jsonfield-compat>=0.4.4 | ||
|
||
django-jsonfield-backport>=1.0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
Django>=2.2.17 | ||
django-jsonfield | ||
django-jsonfield-compat | ||
django-jsonfield-backport | ||
tblib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.