Skip to content

Commit 59ce923

Browse files
committed
Switch to GH actions
1 parent ce0c0ab commit 59ce923

26 files changed

+154
-130
lines changed

.checks.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
- bandit
22
- flake8
33
- pydocstyle
4+
- isort

.editorconfig

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,21 @@
33
root = true
44

55
[*]
6-
charset = utf-8
7-
end_of_line = lf
8-
insert_final_newline = true
9-
trim_trailing_whitespace = true
10-
11-
[*.py]
126
indent_style = space
137
indent_size = 4
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
charset = utf-8
11+
end_of_line = lf
1412
max_line_length = 88
1513

16-
[*.{rst,ini,cfg}]
17-
indent_style = space
18-
indent_size = 4
14+
[*.py]
15+
max_line_length = 120
1916

20-
[*.{yml,html,xml,xsl,json}]
21-
indent_style = space
17+
[*.{yml, html, xml, xsl, json}]
2218
indent_size = 2
2319

24-
[*.{css,less}]
25-
indent_style = space
20+
[*.{css, less}]
2621
indent_size = 2
2722

2823
[*.dot]

.github/workflows/docs.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Docs
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v1
12+
- name: Set up Python
13+
uses: actions/setup-python@v1
14+
- name: Install binary dependencies
15+
run: sudo apt-get install -y python3-enchant graphviz
16+
- name: Install Python dependencies
17+
run: |
18+
python -m pip install --upgrade pip setuptools
19+
pip install sphinxcontrib-spelling
20+
python setup.py develop
21+
- name: Build documentation
22+
run: python setup.py build_sphinx -W -b spelling

.github/workflows/release.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: PyPi Release
2+
3+
on: [release]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v1
11+
- uses: actions/setup-python@v1
12+
- name: Install Python dependencies
13+
run: python -m pip install --upgrade pip setuptools wheel twine
14+
- name: Build dist packages
15+
run: python setup.py sdist bdist_wheel
16+
- name: Upload packages
17+
run: python -m twine upload dist/*
18+
env:
19+
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
20+
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}

.github/workflows/reversion.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Tests with reversion extras
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: [3.5, 3.6, 3.7]
12+
django-version: [2.2.*]
13+
14+
steps:
15+
- uses: actions/checkout@v1
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v1
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: Install binary dependencies
21+
run: |
22+
sudo apt-get update
23+
sudo apt-get install -y graphviz redis-server
24+
- name: Install Python dependencies
25+
run: |
26+
python -m pip install --upgrade pip setuptools wheel codecov
27+
pip install -e .[reversion,test]
28+
pip install django==${{ matrix.django-version }}
29+
- name: Run tests
30+
run: PATH=$PATH:$(pwd)/bin py.test
31+
- run: codecov
32+
env:
33+
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}

.github/workflows/tests.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Tests
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: [3.5, 3.6, 3.7]
12+
django-version: [2.2.*]
13+
14+
steps:
15+
- uses: actions/checkout@v1
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v1
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: Install binary dependencies
21+
run: |
22+
sudo apt-get update
23+
sudo apt-get install -y graphviz redis-server
24+
- name: Install Python dependencies
25+
run: |
26+
python -m pip install --upgrade pip setuptools wheel codecov
27+
pip install -e .[test]
28+
pip install django==${{ matrix.django-version }}
29+
- name: Run tests
30+
run: PATH=$PATH:$(pwd)/bin py.test
31+
- run: codecov
32+
env:
33+
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}

.travis.yml

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

docs/conf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
import django
77

8-
98
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.testapp.settings")
109
sys.path.insert(0, os.path.abspath('..'))
1110
django.setup()
@@ -20,7 +19,7 @@
2019
]
2120

2221
try:
23-
import sphinxcontrib.spelling
22+
import sphinxcontrib.spelling # noqa
2423
except ImportError:
2524
pass
2625
else:

joeflow/admin.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from . import models
77
from .contrib.reversion import VersionAdmin
88

9-
109
__all__ = (
1110
'ProcessAdmin',
1211
)

joeflow/celery.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from django.db import transaction
77

88
from joeflow.contrib.reversion import with_reversion
9+
910
from . import locking
1011

1112
logger = logging.getLogger('joeflow')

0 commit comments

Comments
 (0)