Skip to content

Commit a589748

Browse files
Port on github actions (#73)
* Add github actions * pin treebeard to 4.4 * remove travis.yml
1 parent dd59f81 commit a589748

File tree

11 files changed

+100
-43
lines changed

11 files changed

+100
-43
lines changed

.github/workflows/lint.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Lint
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
flake8:
7+
name: flake8
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v2
12+
- name: Set up Python
13+
uses: actions/setup-python@v2
14+
with:
15+
python-version: 3.9
16+
- name: Install flake8
17+
run: pip install --upgrade flake8
18+
- name: Run flake8
19+
uses: liskin/gh-problem-matcher-wrap@v1
20+
with:
21+
linters: flake8
22+
run: flake8
23+
24+
isort:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v2
29+
- name: Set up Python
30+
uses: actions/setup-python@v2
31+
with:
32+
python-version: 3.9
33+
- run: python -m pip install isort
34+
- name: isort
35+
uses: liskin/gh-problem-matcher-wrap@v1
36+
with:
37+
linters: isort
38+
run: isort -c -rc -df djangocms_snippet

.github/workflows/test.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CodeCov
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
unit-tests:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
python-version: [ 3.7, 3.8, 3.9, ] # latest release minus two
12+
requirements-file: [
13+
dj22_cms37.txt,
14+
dj22_cms38.txt,
15+
dj30_cms37.txt,
16+
dj30_cms38.txt,
17+
dj31_cms38.txt,
18+
]
19+
os: [
20+
ubuntu-20.04,
21+
]
22+
23+
steps:
24+
- uses: actions/checkout@v1
25+
- name: Set up Python ${{ matrix.python-version }}
26+
27+
uses: actions/setup-python@v2
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
- name: Install dependencies
31+
run: |
32+
python -m pip install --upgrade pip
33+
pip install -r tests/requirements/${{ matrix.requirements-file }}
34+
python setup.py install
35+
36+
- name: Run coverage
37+
run: coverage run setup.py test
38+
39+
- name: Upload Coverage to Codecov
40+
uses: codecov/codecov-action@v1

.travis.yml

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

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
REQUIREMENTS = [
88
'django-cms>=3.7',
9+
'django-treebeard>=4.3,<4.5',
910
]
1011

1112

File renamed without changes.

tests/requirements/dj22_cms37.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-r base.txt
2+
3+
Django>=2.2,<3.0
4+
django-cms>=3.7,<3.8

tests/requirements/dj22_cms38.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-r base.txt
2+
3+
Django>=2.2,<3.0
4+
django-cms>=3.8,<3.9

tests/requirements/dj30_cms37.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-r base.txt
2+
3+
Django>=3.0,<3.1
4+
django-cms>=3.7,<3.8

tests/requirements/dj30_cms38.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-r base.txt
2+
3+
Django>=3.0,<3.1
4+
django-cms>=3.8,<3.9

tests/requirements/dj31_cms38.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-r base.txt
2+
3+
Django>=3.1,<3.2
4+
django-cms>=3.8,<3.9

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ known_django = django
3939

4040
[testenv]
4141
deps =
42-
-r{toxinidir}/tests/requirements.txt
42+
-r{toxinidir}/tests/requirements/base.txt
4343
dj22: Django>=2.2,<3.0
4444
dj30: Django>=3.0,<3.1
4545
dj31: Django>=3.1,<3.2

0 commit comments

Comments
 (0)