Skip to content

Commit

Permalink
Update dotfiles (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
yakky authored Jul 15, 2020
1 parent e6d7be8 commit 548010a
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 59 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/---bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Please fill in each section to help maintainers to be helpful and quick to respo
Describe issue in general terms.
-->

## Steps to reproduce
## Steps to reproduce

<!--
Provide clear steps to reproduce the issue.
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Code quality

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
python-version: [3.8]
toxenv: [pep8, isort, black, pypi-description, docs, towncrier]
steps:
- uses: actions/checkout@v2
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.toxenv }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.toxenv }}
- name: Cache tox
uses: actions/cache@v1
with:
path: .tox
key: ${{ runner.os }}-lint-${{ matrix.toxenv }}-${{ hashFiles('setup.cfg') }}
restore-keys: |
${{ runner.os }}-lint-${{ matrix.toxenv }}-
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools tox>=1.8
- name: Test with tox
run: |
tox -e${{ matrix.toxenv }}
41 changes: 2 additions & 39 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,8 @@
name: Linting - Tests
name: Tox tests

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
python-version: [3.8]
toxenv: [pep8, isort, black, pypi-description, docs, towncrier]
steps:
- uses: actions/checkout@v2
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.toxenv }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.toxenv }}
- name: Cache tox
uses: actions/cache@v1
with:
path: .tox
key: ${{ runner.os }}-lint-${{ matrix.toxenv }}-${{ hashFiles('setup.cfg') }}
restore-keys: |
${{ runner.os }}-lint-${{ matrix.toxenv }}-
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools tox>=1.8
- name: Test with tox
run: |
tox -e${{ matrix.toxenv }}
test:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
Expand Down Expand Up @@ -74,7 +37,7 @@ jobs:
python -m pip install --upgrade pip tox>=3.5
- name: Test with tox
env:
TOX_ENV: ${{ format('py{0}-django{1}-cms{2}', matrix.python-version, matrix.django, matrix.cms) }}
TOX_ENV: ${{ format('py-django{1}-cms{2}', matrix.python-version, matrix.django, matrix.cms) }}
COMMAND: coverage run
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
Expand Down
15 changes: 15 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2

sphinx:
configuration: docs/conf.py
fail_on_warning: true

formats:
- epub
- pdf

python:
version: 3.7
install:
- requirements: requirements-test.txt
system_packages: false
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ deserve a huge thanks for their work.
:target: https://pypi.python.org/pypi/django-app-helper
:alt: Python versions

.. |GAStatus| image:: https://github.com/nephila/django-app-helper/workflows/Linting%20-%20Tests/badge.svg
.. |GAStatus| image:: https://github.com/nephila/django-app-helper/workflows/workflows/Tox%20tests/badge.svg
:target: https://github.com/nephila/django-app-helper
:alt: Latest CI build status

Expand Down
1 change: 1 addition & 0 deletions changes/189.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update dotfiles to latest version
6 changes: 0 additions & 6 deletions requirements-docs.txt

This file was deleted.

10 changes: 8 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ packages = find:
python_requires = >=3.5
test_suite = app_helper.tests
zip_safe = False
keywords =
django
tests
development
pytest
django-cms

[options.package_data]
* = *.txt, *.rst
Expand All @@ -69,8 +75,8 @@ console_scripts =
django-app-helper = app_helper.main:main

[options.extras_require]
pyflakes = pyflakes<2.1;django-cms>=3.4,<3.8
cms = django-cms>=3.4,<3.8"
pyflakes = pyflakes<2.1;django-cms>=3.7,<3.8
cms = django-cms>=3.7,<3.8"
[upload]
repository = https://upload.pypi.org/legacy/
Expand Down
23 changes: 13 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[tox]
downloadcache = {toxworkdir}/cache
envlist =
black
blacken
Expand All @@ -9,9 +8,8 @@ envlist =
pep8
pypi-description
towncrier
py{3.8,3.7,3.6}-django{30}-cms{37,no}
py{3.8,3.7,3.6,3.5}-django{22}-cms{37,no}
skip_missing_interpreters = True
py{38,37,36}-django{30}-cms{37,no}
py{38,37,36,35}-django{22}-cms{37,no}

[testenv]
commands = {env:COMMAND:python} helper.py {posargs}
Expand All @@ -24,18 +22,18 @@ deps=
django30: django-polymorphic>2.0
cms37: django-cms<=3.7,<3.8
cms37: djangocms-text-ckeditor>=3.6
cms37: html5lib>=1.0
-r{toxinidir}/requirements-test.txt
passenv =
COMMAND
PYTEST_*

[testenv:nocms]
basepython = python3.7

[testenv:pep8]
commands =
{envpython} -m flake8
{envpython} -minterrogate -c pyproject.toml app_helper
{envpython} -minterrogate -c pyproject.toml app_helper tests
deps =
interrogate
flake8
Expand All @@ -53,13 +51,13 @@ skip_install = true

[testenv:isort]
commands =
{envpython} -m isort -c --df app_helper
{envpython} -m isort -c --df app_helper tests
deps = isort>5,<5.1
skip_install = true

[testenv:isort_format]
commands =
{envpython} -m isort app_helper
{envpython} -m isort app_helper tests
deps = {[testenv:isort]deps}
skip_install = true

Expand All @@ -82,6 +80,7 @@ deps =
invoke
sphinx
sphinx-rtd-theme
sphinx-autobuild
livereload~=2.6
-rrequirements-test.txt
skip_install = true
Expand Down Expand Up @@ -144,12 +143,16 @@ ignore =
.*
*.ini
*.toml
*.json
*.txt
*.yml
app_helper/test_utils/AUTHORS
app_helper/test_utils/example1/locale/**
*.yaml
.tx/**
changes/**
docs/**
helper.py
tasks.py
tests/**
*.mo
ignore-bad-ideas =
*.mo

0 comments on commit 548010a

Please sign in to comment.