Skip to content

Commit 051c27d

Browse files
committed
Testing different versions of wagtail and auto build pypi
1 parent a711049 commit 051c27d

File tree

7 files changed

+82
-21
lines changed

7 files changed

+82
-21
lines changed

.coveragerc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
[run]
2-
include = wagtail_jotform/*
3-
omit = *migrations*, *tests*
2+
omit = *migrations*, *tests*
3+
4+
source = wagtail_jotform
5+
6+
[html]
7+
directory = coverage_html_report
8+
9+
[report]
10+
show_missing = True

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published, prereleased]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: Set up Python 3
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: 3
18+
19+
- name: Install dependencies
20+
run: python -m pip install --upgrade setuptools wheel
21+
22+
- name: Build Python package
23+
run: python setup.py bdist_wheel sdist
24+
25+
- name: Upload Python packages artifact
26+
uses: actions/upload-artifact@v1
27+
with:
28+
name: Python Packages
29+
path: dist
30+
31+
- name: Publish to PyPI
32+
uses: pypa/gh-action-pypi-publish@master
33+
with:
34+
user: __token__
35+
password: ${{ secrets.pypi_production_token }}

.github/workflows/test.yml

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,40 @@ on:
66
pull_request:
77
branches: [master]
88

9+
# Current configuration:
10+
# - python 3.9, wagtail 3.0
11+
# - python 3.8, wagtail 2.16
12+
# - python 3.7, django 2.15
13+
914
jobs:
10-
build:
15+
test:
16+
name: 🧪 Test
1117
runs-on: ubuntu-latest
1218
strategy:
1319
matrix:
14-
python-version: [3.7, 3.8, 3.9]
15-
20+
include:
21+
- python: 3.9
22+
wagtail: wagtail>=3.0,<4.0
23+
latest: true
24+
- python: 3.8
25+
wagtail: wagtail>=2.16,<3.0
26+
- python: 3.7
27+
wagtail: wagtail>=2.15, <2.16
1628
steps:
17-
- uses: actions/checkout@v2
18-
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v2
29+
- uses: actions/checkout@v3
30+
- uses: actions/setup-python@v3
2031
with:
21-
python-version: ${{ matrix.python-version }}
22-
- name: Install dependencies
23-
run: |
24-
python -m pip install --upgrade pip
25-
python -m pip install wagtail coverage
26-
- name: Test
27-
run: |
32+
python-version: ${{ matrix.python }}
33+
cache: "pip"
34+
cache-dependency-path: "**/setup.cfg"
35+
- run: |
2836
pip install coverage
37+
pip install "${{ matrix.wagtail }}"
38+
- run: |
2939
coverage run ./runtests.py
3040
coverage report
3141
coverage xml
32-
bash <(curl -s https://codecov.io/bash) -t "d685b3ae-a510-4fa6-8c07-7b4d4367fdf3"
42+
- if: ${{ matrix.latest }}
43+
uses: codecov/codecov-action@v2
44+
with:
45+
name: Python 3.9

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![tests](https://github.com/kevinhowbrook/wagtail-jotform/workflows/Tests/badge.svg)
22
[![codecov](https://codecov.io/gh/kevinhowbrook/wagtail-jotform/branch/master/graph/badge.svg?token=GBDM9H1A2X)](https://codecov.io/gh/kevinhowbrook/wagtail-jotform)
3-
[![black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
3+
[![black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Total alerts](https://img.shields.io/lgtm/alerts/g/kevinhowbrook/wagtail-jotform.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/kevinhowbrook/wagtail-jotform/alerts/)
44

55
# Wagtail Jotform
66

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ description = ""
55
authors = ["Your Name <you@example.com>"]
66

77
[tool.poetry.dependencies]
8-
python = "^3.8"
9-
wagtail = "^3.0"
10-
Django = "^4.0.5"
8+
python = "^3.7"
9+
wagtail = "^2.15"
10+
Django = "^3.2"
1111
coverage = "^6.4.1"
1212

1313
[tool.poetry.dev-dependencies]

setup.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
with open(path.join(this_directory, "README.md"), encoding="utf-8") as f:
99
long_description = f.read()
1010

11+
testing_extras = [
12+
'coverage>=6.4.1',
13+
'tox-poetry>=0.4.1'
14+
]
1115

1216
setup(
1317
name="wagtail-jotform",
@@ -33,5 +37,7 @@
3337
"Programming Language :: Python :: 3.7",
3438
"Framework :: Wagtail",
3539
"Framework :: Wagtail :: 2",
40+
"Framework :: Wagtail :: 3",
3641
],
42+
extras_require={'testing': testing_extras},
3743
)

wagtail_jotform/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
VERSION = (1, 0, 4)
1+
VERSION = (1, 0, 5)
22
__version__ = ".".join(map(str, VERSION))

0 commit comments

Comments
 (0)