Skip to content

Commit 43303e6

Browse files
committed
Switch to GitHub actions
1 parent 498839c commit 43303e6

16 files changed

Lines changed: 154 additions & 138 deletions

File tree

.github/workflows/tests.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
tests:
11+
name: Python ${{ matrix.python-version }}
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
python-version:
17+
- 3.6
18+
- 3.7
19+
- 3.8
20+
- 3.9
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip wheel setuptools tox
31+
- name: Run tox targets for ${{ matrix.python-version }}
32+
run: |
33+
ENV_PREFIX=$(tr -C -d "0-9" <<< "${{ matrix.python-version }}")
34+
TOXENV=$(tox --listenvs | grep "^py$ENV_PREFIX" | tr '\n' ',') python -m tox
35+
36+
lint:
37+
name: Lint
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v2
41+
- name: Set up Python
42+
uses: actions/setup-python@v2
43+
with:
44+
python-version: 3.9
45+
- name: Install dependencies
46+
run: |
47+
python -m pip install --upgrade pip tox
48+
- name: Run lint
49+
run: tox -e style

.travis.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Change log
55
`Next version`_
66
~~~~~~~~~~~~~~~
77

8+
- Switched from Travis CI to GitHub actions.
9+
810

911
`0.11`_ (2020-09-23)
1012
~~~~~~~~~~~~~~~~~~~~

README.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
feincms3-sites
33
==============
44

5-
.. image:: https://travis-ci.org/matthiask/feincms3-sites.svg?branch=master
6-
:target: https://travis-ci.org/matthiask/feincms3-sites
5+
.. image:: https://github.com/matthiask/feincms3-sites/workflows/Tests/badge.svg
6+
:target: https://github.com/matthiask/feincms3-sites/
7+
:alt: CI Status
78

89
Multisite support for `feincms3 <https://feincms3.readthedocs.io>`_.
910

feincms3_sites/models.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from django.core.validators import RegexValidator
66
from django.db import models
77
from django.utils.translation import gettext_lazy as _
8-
98
from feincms3 import pages
109

1110
from feincms3_sites.middleware import current_site

setup.cfg

Lines changed: 56 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,61 @@
1+
[metadata]
2+
name = feincms3_sites
3+
version = attr: feincms3_sites.__version__
4+
description = Multisite support for feincms3
5+
long_description = file: README.rst
6+
long_description_content_type = text/x-rst
7+
url = https://github.com/matthiask/feincms3-sites/
8+
author = Matthias Kestenholz
9+
author_email = mk@feinheit.ch
10+
license = BSD-3-Clause
11+
license_file = LICENSE
12+
platforms = OS Independent
13+
classifiers =
14+
Environment :: Web Environment
15+
Framework :: Django
16+
Intended Audience :: Developers
17+
License :: OSI Approved :: BSD License
18+
Operating System :: OS Independent
19+
Programming Language :: Python
20+
Programming Language :: Python :: 3
21+
Programming Language :: Python :: 3 :: Only
22+
Programming Language :: Python :: 3.6
23+
Programming Language :: Python :: 3.7
24+
Programming Language :: Python :: 3.8
25+
Programming Language :: Python :: 3.9
26+
Topic :: Internet :: WWW/HTTP :: Dynamic Content
27+
Topic :: Software Development
28+
Topic :: Software Development :: Libraries :: Application Frameworks
29+
30+
[options]
31+
packages = find:
32+
install_requires =
33+
Django>=2.2
34+
feincms3>=0.38.1
35+
contextvars;python_version<"3.7"
36+
python_requires = >=3.6
37+
include_package_data = True
38+
zip_safe = False
39+
40+
[options.extras_require]
41+
tests =
42+
coverage
43+
44+
[options.packages.find]
45+
exclude =
46+
tests
47+
testapp
48+
149
[flake8]
2-
exclude=venv,build,docs,.tox,migrations
3-
max-complexity=10
4-
max-line-length=88
50+
exclude = venv,build,docs,.tox,migrations
51+
ignore = E203,W503
52+
max-complexity = 10
53+
max-line-length = 88
554

6-
[bdist_wheel]
7-
universal = 1
55+
[isort]
56+
profile = black
57+
combine_as_imports = True
58+
lines_after_imports = 2
859

960
[coverage:run]
1061
branch = True

setup.py

Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,5 @@
11
#!/usr/bin/env python3
2+
from setuptools import setup
23

3-
from io import open
4-
import os
5-
from setuptools import find_packages, setup
64

7-
8-
def read(filename):
9-
path = os.path.join(os.path.dirname(__file__), filename)
10-
with open(path, encoding="utf-8") as handle:
11-
return handle.read()
12-
13-
14-
setup(
15-
name="feincms3-sites",
16-
version=__import__("feincms3_sites").__version__,
17-
description="Multisite support for feincms3",
18-
long_description=read("README.rst"),
19-
author="Matthias Kestenholz",
20-
author_email="mk@feinheit.ch",
21-
url="https://github.com/matthiask/feincms3-sites/",
22-
license="BSD License",
23-
platforms=["OS Independent"],
24-
packages=find_packages(exclude=["tests", "testapp"]),
25-
include_package_data=True,
26-
classifiers=[
27-
# 'Development Status :: 5 - Production/Stable',
28-
"Environment :: Web Environment",
29-
"Framework :: Django",
30-
"Intended Audience :: Developers",
31-
"License :: OSI Approved :: BSD License",
32-
"Operating System :: OS Independent",
33-
"Programming Language :: Python",
34-
"Programming Language :: Python :: 3",
35-
"Programming Language :: Python :: 3.6",
36-
"Programming Language :: Python :: 3.7",
37-
"Programming Language :: Python :: 3.8",
38-
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
39-
"Topic :: Software Development",
40-
"Topic :: Software Development :: Libraries :: Application Frameworks",
41-
],
42-
zip_safe=False,
43-
install_requires=[
44-
"Django>=2.2",
45-
"feincms3>=0.38.1",
46-
"django-tree-queries>=0.4.1",
47-
'contextvars;python_version<"3.7"',
48-
],
49-
)
5+
setup()

tests/testapp/admin.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1+
from content_editor.admin import ContentEditor
12
from django.contrib import admin
23
from django.utils.text import capfirst
34
from django.utils.translation import gettext_lazy as _
4-
5-
from content_editor.admin import ContentEditor
65
from feincms3 import plugins
76
from feincms3.admin import AncestorFilter, TreeAdmin
87

tests/testapp/articles_urls.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
from django.urls import re_path
21
from django.shortcuts import get_object_or_404
3-
2+
from django.urls import re_path
43
from feincms3.applications import page_for_app_request
54
from feincms3.shortcuts import render_detail, render_list
65

tests/testapp/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
from content_editor.models import Region, Template, create_plugin_base
12
from django.db import models
23
from django.utils.translation import gettext_lazy as _
3-
4-
from content_editor.models import Region, Template, create_plugin_base
54
from feincms3 import plugins
65
from feincms3.applications import AppsMixin, reverse_app
76
from feincms3.mixins import LanguageMixin, MenuMixin, RedirectMixin, TemplateMixin
7+
88
from feincms3_sites.models import AbstractPage
99

1010

0 commit comments

Comments
 (0)