Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented GitHub actions for CI #559

Merged
merged 18 commits into from
Apr 6, 2021
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Frontend

on: [push]

jobs:
frontend:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [6.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install gulp
run: npm install -g gulp@3.9.1
- name: Install dependencies
run: npm install
- name: Run gulp
run: gulp ci
39 changes: 39 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Lint

on: [push]

jobs:
flake8:
name: flake8
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install flate8
run: pip install --upgrade flake8
- name: Run flake8
uses: liskin/gh-problem-matcher-wrap@v1
with:
linters: flake8
run: |
flake8 --exit-zero

isort:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- run: python -m pip install isort
- name: isort
uses: liskin/gh-problem-matcher-wrap@v1
with:
linters: isort
run: isort -c -rc -df djangocms_text_ckeditor
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Unit tests

on: [push]

jobs:
unit-tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [ 3.7, 3.8, 3.9, ] # latest release minus two
requirements-file: [
dj22_cms37.txt,
dj22_cms38.txt,
dj30_cms37.txt,
dj30_cms38.txt,
dj31_cms38.txt,
]
os: [
ubuntu-20.04,
]

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r tests/requirements/${{ matrix.requirements-file }}
python setup.py install

- name: Run tests
run: python setup.py test
53 changes: 0 additions & 53 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Changelog
* Dropped support for Django < 2.2
* Ensure that correct urls are generated when static files are hosted on a CDN
* Allow to style WYSIWYG content based on parent plugins, by adding
``CMSPluginBase.child_ckeditor_body_css_class`` to a parent (#520)
``CMSPluginBase.child_ckeditor_body_css_class`` to a parent (#520)
* Upgrade to CKeditor version to 4.14.1


Expand Down
30 changes: 30 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[flake8]
ignore = E251,E128,E501
max-line-length = 119
exclude =
*.egg-info,
.eggs,
.git,
.settings,
.tox,
build,
data,
dist,
docs,
*migrations*,
requirements,
tmp,
*node_modules*

[isort]
line_length = 79
skip = manage.py, *migrations*, .tox, .eggs, data
include_trailing_comma = true
multi_line_output = 5
not_skip = __init__.py
lines_after_imports = 2
default_section = THIRDPARTY
sections = FUTURE, STDLIB, DJANGO, CMS, THIRDPARTY, FIRSTPARTY, LIB, LOCALFOLDER
known_first_party = djangocms_text_ckeditor
known_cms = cms, menus
known_django = django
2 changes: 2 additions & 0 deletions tests/requirements.txt → tests/requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ django-filer>=1.4.0
djangocms-picture>=2.1.0
djangocms-link>=2.2.1
django-polymorphic>=2.0.3
django-treebeard<4.5
Pillow
html5lib>=0.999999999

# other requirements
django-app-helper
tox
Expand Down
4 changes: 4 additions & 0 deletions tests/requirements/dj22_cms37.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-r base.txt

Django>=2.2,<3.0
django-cms>=3.7,<3.8
4 changes: 4 additions & 0 deletions tests/requirements/dj22_cms38.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-r base.txt

Django>=2.2,<3.0
django-cms>=3.8,<3.9
4 changes: 4 additions & 0 deletions tests/requirements/dj30_cms37.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-r base.txt

Django>=3.0,<3.1
django-cms>=3.7,<3.8
4 changes: 4 additions & 0 deletions tests/requirements/dj30_cms38.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-r base.txt

Django>=3.0,<3.1
django-cms>=3.8,<3.9
4 changes: 4 additions & 0 deletions tests/requirements/dj31_cms38.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-r base.txt

Django>=3.1,<3.2
django-cms>=3.8,<3.9