Skip to content

Commit e97e57a

Browse files
authored
Use github workflows (#11)
* Use github workflows * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP
1 parent 290708a commit e97e57a

File tree

14 files changed

+408
-182
lines changed

14 files changed

+408
-182
lines changed

.github/workflows/lint.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
name: Lint
3+
on: # yamllint disable-line rule:truthy
4+
push:
5+
branches:
6+
- '**'
7+
8+
jobs:
9+
black:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v1
13+
- name: Set up Python 3.8
14+
uses: actions/setup-python@v1
15+
with:
16+
python-version: 3.8
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install tox
21+
- name: Black with tox
22+
run: tox -e black
23+
isort:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v1
27+
- name: Set up Python 3.8
28+
uses: actions/setup-python@v1
29+
with:
30+
python-version: 3.8
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install --upgrade pip
34+
pip install tox
35+
- name: Isort with tox
36+
run: tox -e isort
37+
pylint:
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v1
41+
- name: Set up Python 3.8
42+
uses: actions/setup-python@v1
43+
with:
44+
python-version: 3.8
45+
- name: Install dependencies
46+
run: |
47+
python -m pip install --upgrade pip
48+
pip install tox
49+
- name: Pylint with tox
50+
run: tox -e pylint

.github/workflows/release.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
name: Release
3+
on: # yamllint disable-line rule:truthy
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
lint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v1
12+
- name: Set up Python 3.8
13+
uses: actions/setup-python@v1
14+
with:
15+
python-version: 3.8
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install tox
20+
- name: Black with tox
21+
run: tox -e black,isort,pylint
22+
test:
23+
runs-on: ubuntu-latest
24+
strategy:
25+
max-parallel: 3
26+
matrix:
27+
python-version: [3.6, 3.7, 3.8]
28+
dj-version: [django22]
29+
steps:
30+
- uses: actions/checkout@v1
31+
- name: Set up Python ${{ matrix.python-version }}
32+
uses: actions/setup-python@v1
33+
with:
34+
python-version: ${{ matrix.python-version }}
35+
- name: Install dependencies
36+
run: |
37+
python -m pip install --upgrade pip
38+
pip install tox
39+
- name: Test with tox
40+
run: |
41+
PY_VERSION=${{ matrix.python-version }} &&
42+
tox -e py${PY_VERSION//.}-${{ matrix.dj-version }}
43+
- name: Upload coverage to Codecov
44+
uses: codecov/codecov-action@v1
45+
with:
46+
token: ${{ secrets.CODECOV_TOKEN }}
47+
file: ./coverage.xml
48+
flags: unittests
49+
name: ${{ matrix.python-version }}-${{ matrix.dj-version }}
50+
yml: ./codecov.yml
51+
pip_package:
52+
runs-on: ubuntu-latest
53+
needs: [test, lint]
54+
steps:
55+
- uses: actions/checkout@v1
56+
- name: Set up Python 3.8
57+
uses: actions/setup-python@v1
58+
with:
59+
python-version: 3.8
60+
- name: Install dependencies
61+
run: |
62+
python -m pip install --upgrade pip
63+
pip install tox
64+
- name: Publish pip packages with tox
65+
run: tox -e release
66+
env:
67+
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}

.github/workflows/test.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Test
3+
on: # yamllint disable-line rule:truthy
4+
push:
5+
branches:
6+
- '**'
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
max-parallel: 3
13+
matrix:
14+
python-version: [3.7, 3.8]
15+
dj-version: [django30]
16+
17+
steps:
18+
- uses: actions/checkout@v1
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v1
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install tox
27+
- name: Test with tox
28+
run: |
29+
PY_VERSION=${{ matrix.python-version }} &&
30+
tox -e py${PY_VERSION//.}-${{ matrix.dj-version }}
31+
- name: Upload coverage to Codecov
32+
uses: codecov/codecov-action@v1
33+
with:
34+
token: ${{ secrets.CODECOV_TOKEN }}
35+
file: ./coverage.xml
36+
flags: unittests
37+
name: ${{ matrix.python-version }}-${{ matrix.dj-version }}
38+
yml: ./codecov.yml

.gitlab-ci.yml

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

.travis.yml

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

MANIFEST.in

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1+
include LICENSE
12
include README.md
2-
recursive-include wagtail_code_blog *.html *.png *.gif *js *.css *jpg *jpeg *svg *py
3+
recursive-include wagtail_code_blog *.html *.css *.py
4+
global-exclude __pycache__
5+
global-exclude *.py[co]
6+
global-exclude .mypy_cache

0 commit comments

Comments
 (0)