Skip to content

Commit 7c919cd

Browse files
authored
Merge pull request #63 from peopledoc/django-compat
Django compat: 3.1, 3.2, 4.0
2 parents 397f1fa + f618287 commit 7c919cd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+880
-956
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Closes #<ticket number>
2+
3+
<!-- Please do not remove this, even if you think you don't need it -->
4+
### Successful PR Checklist:
5+
- [ ] Tests
6+
- [ ] (not applicable?)

.github/release-drafter.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
template: |
2+
$CHANGES
3+
4+
## Kudos:
5+
6+
$CONTRIBUTORS

.github/workflows/ci.yml

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- 'master'
8+
tags:
9+
- '*'
10+
11+
jobs:
12+
build:
13+
14+
strategy:
15+
matrix:
16+
include:
17+
18+
- name: Python 3.7 / Django 3.2
19+
python_version: "3.7"
20+
tox_env: py37-django32
21+
22+
- name: Python 3.8 / Django 3.2
23+
python_version: "3.8"
24+
tox_env: py38-django32
25+
26+
- name: Python 3.9 / Django 2.2
27+
python_version: "3.9"
28+
tox_env: py39-django22
29+
30+
- name: Python 3.9 / Django 3.0
31+
python_version: "3.9"
32+
tox_env: py39-django30
33+
34+
- name: Python 3.9 / Django 3.1
35+
python_version: "3.9"
36+
tox_env: py39-django31
37+
38+
- name: Python 3.9 / Django 3.2
39+
python_version: "3.9"
40+
tox_env: py39-django32
41+
42+
- name: Python 3.9 / Django 4.0
43+
python_version: "3.9"
44+
tox_env: py39-django40
45+
46+
- name: Python 3.10 / Django 3.2
47+
python_version: "3.10"
48+
tox_env: py310-django32
49+
50+
- name: Lint
51+
python_version: "3.10"
52+
tox_env: lint
53+
54+
55+
name: "${{ matrix.name }}"
56+
runs-on: ubuntu-latest
57+
58+
services:
59+
postgres:
60+
image: postgres
61+
# Set health checks to wait until postgres has started
62+
env:
63+
POSTGRES_PASSWORD: postgres
64+
options: >-
65+
--health-cmd pg_isready
66+
--health-interval 10s
67+
--health-timeout 5s
68+
ports:
69+
- 5432:5432
70+
71+
steps:
72+
- uses: actions/checkout@v2
73+
74+
- name: Set up Python
75+
id: setup-python
76+
uses: actions/setup-python@v2
77+
with:
78+
python-version: ${{ matrix.python_version }}
79+
80+
- name: Pip cache
81+
uses: actions/cache@v2
82+
with:
83+
path: |
84+
~/.cache/
85+
key: ${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('setup.py') }}
86+
87+
- name: Install Tox
88+
run: pip install tox
89+
90+
- name: Run ${{ matrix.name }}
91+
run: tox -e ${{ matrix.tox_env }}
92+
env:
93+
PGHOST: localhost
94+
PGUSER: postgres
95+
PGPASSWORD: postgres
96+
97+
report-status:
98+
name: success
99+
runs-on: ubuntu-latest
100+
needs: build
101+
steps:
102+
103+
- name: Report success
104+
run: echo 'Success !'

.github/workflows/publish.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
release:
8+
types:
9+
- published
10+
11+
jobs:
12+
deploy:
13+
name: Publish package to PyPI
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- name: Set up Python
19+
id: setup-python
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: ${{ matrix.python_version }}
23+
24+
- name: Install
25+
run: pip install build
26+
27+
- name: Wait for tests to succeed
28+
uses: fountainhead/action-wait-for-check@v1.0.0
29+
id: wait-for-ci
30+
with:
31+
token: ${{ secrets.GITHUB_TOKEN }}
32+
checkName: success
33+
34+
- name: Exit if CI did not succeed
35+
if: steps.wait-for-ci.outputs.conclusion != 'success'
36+
run: exit 1
37+
38+
- name: Build package
39+
run: python -m build
40+
41+
- name: Publish a Python distribution to PyPI
42+
uses: pypa/gh-action-pypi-publish@release/v1
43+
with:
44+
user: __token__
45+
password: "${{ secrets.PYPI_TOKEN }}"

.github/workflows/release-drafter.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
update_release_draft:
10+
runs-on: ubuntu-latest
11+
steps:
12+
# Drafts the next Release notes as Pull Requests are merged into "master"
13+
- uses: release-drafter/release-drafter@v5
14+
env:
15+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.travis.yml

-27
This file was deleted.

CHANGELOG

-173
This file was deleted.

0 commit comments

Comments
 (0)