Skip to content

Commit

Permalink
Merge 9766c06 into 133a24a
Browse files Browse the repository at this point in the history
  • Loading branch information
Mojken committed Mar 29, 2022
2 parents 133a24a + 9766c06 commit a4d8b1a
Show file tree
Hide file tree
Showing 37 changed files with 358 additions and 453 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Expand Up @@ -6,7 +6,6 @@
.gitignore
.next/
.stuff/
.travis.yml
.venv/
Dockerfile
dist/
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/main.yml
@@ -0,0 +1,63 @@
name: CI

on:
push:
branches:
- master
pull_request:

jobs:
tests:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest

strategy:
max-parallel: 5
matrix:
python-version:
- "3.6"
- "3.7"
- "3.8"
- "3.9"

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade packaging tools
run: python -m pip install --upgrade pip setuptools virtualenv
- name: Install dependencies
run: python -m pip install --upgrade tox
- name: Run tox targets for ${{ matrix.python-version }}
run: |
ENV_PREFIX=$(tr -C -d "0-9" <<< "${{ matrix.python-version }}")
TOXENV=$(tox --listenvs | grep "^py$ENV_PREFIX" | tr '\n' ',') python -m tox
- uses: actions/upload-artifact@master
with:
name: coverage-files
path: ./.coverage.*

coverage:
name: Reporting Coverage
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'synchronize')
needs: [tests]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- uses: actions/download-artifact@v3
with:
name: coverage-files
path: .
- name: Combine coverage reports
run: |
python -m pip install coverage
make coverage-lcov
- name: Upload coverage report
uses: coverallsapp/github-action@1.1.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: "./coverage.info"
4 changes: 2 additions & 2 deletions .gitignore
Expand Up @@ -2,7 +2,7 @@
*.egg
*.egg-info
*.eggs/
.coverage
.coverage*
.idea
.DS_Store
.tox
Expand All @@ -22,4 +22,4 @@ example/db.sqlite3
*~
\#*\#
.#*.*
*_flymake*
*_flymake*
93 changes: 0 additions & 93 deletions .travis.yml

This file was deleted.

6 changes: 6 additions & 0 deletions Makefile
Expand Up @@ -18,9 +18,15 @@ coverage:
coverage combine || true
coverage report

.PHONY: coverage-lcov
coverage-lcov:
coverage combine || true
coverage lcov -o coverage.info

.PHONY: lint
lint:
flake8 djedi
isort djedi

.PHONY: install
install:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -2,7 +2,7 @@

Django content management as it should be.

[![Build Status](https://travis-ci.org/5monkeys/djedi-cms.svg?branch=master)](https://travis-ci.org/5monkeys/djedi-cms)
[![Build Status](https://github.com/5monkeys/djedi-cms/workflows/CI/badge.svg)](https://github.com/5monkeys/djedi-cms/actions)
[![Coverage Status](https://coveralls.io/repos/5monkeys/djedi-cms/badge.svg?branch=master&service=github)](https://coveralls.io/github/5monkeys/djedi-cms?branch=master)
[![Version](https://img.shields.io/pypi/v/djedi-cms.svg)](https://pypi.python.org/pypi/djedi-cms/)
[![Python Versions](https://img.shields.io/pypi/pyversions/djedi-cms.svg)](https://pypi.python.org/pypi/djedi-cms/)
Expand Down
1 change: 0 additions & 1 deletion djedi-react/.dockerignore
Expand Up @@ -6,7 +6,6 @@
.gitignore
.next/
.stuff/
.travis.yml
Dockerfile
dist/
docker-compose.yml
Expand Down
1 change: 1 addition & 0 deletions djedi/__init__.py
Expand Up @@ -30,6 +30,7 @@ def get_version(version=None):

def configure():
from django.conf import settings as django_settings

from cio.conf import settings

# Djedi default config
Expand Down
1 change: 1 addition & 0 deletions djedi/admin/__init__.py
@@ -1,6 +1,7 @@
from django.contrib import admin
from django.db.models import Model
from django.template.defaultfilters import pluralize

from djedi.admin import cms


Expand Down
10 changes: 5 additions & 5 deletions djedi/admin/api.py
@@ -1,8 +1,7 @@
from collections import defaultdict
from djedi.plugins.base import DjediPlugin

from django.core.exceptions import PermissionDenied
from django.http import HttpResponse, Http404, HttpResponseBadRequest
from django.http import Http404, HttpResponse, HttpResponseBadRequest
from django.utils.http import urlunquote
from django.views.decorators.cache import never_cache
from django.views.decorators.clickjacking import xframe_options_exempt
Expand All @@ -13,11 +12,12 @@
from cio.plugins import plugins
from cio.plugins.exceptions import UnknownPlugin
from cio.utils.uri import URI
from djedi.plugins.base import DjediPlugin

from .exceptions import InvalidNodeData
from .mixins import JSONResponseMixin, DjediContextMixin
from ..compat import TemplateResponse
from .. import auth
from ..compat import TemplateResponse
from .exceptions import InvalidNodeData
from .mixins import DjediContextMixin, JSONResponseMixin


class APIView(View):
Expand Down
3 changes: 2 additions & 1 deletion djedi/admin/mixins.py
@@ -1,8 +1,9 @@
import simplejson as json
from django.conf import settings as django_settings
from django.http import HttpResponse
from cio.conf import settings

import djedi
from cio.conf import settings

# TODO: Switch simplejson to ujson or other?

Expand Down
4 changes: 2 additions & 2 deletions djedi/backends/django/cache/backend.py
@@ -1,10 +1,10 @@
import six
from django.core.cache import InvalidCacheBackendError
from djedi.utils.encoding import smart_str, smart_unicode
from cio.backends.base import CacheBackend
from django.core.cache.backends.locmem import LocMemCache

from cio.backends.base import CacheBackend
from djedi.compat import get_cache
from djedi.utils.encoding import smart_str, smart_unicode


class DjangoCacheBackend(CacheBackend):
Expand Down
2 changes: 1 addition & 1 deletion djedi/backends/django/db/backend.py
@@ -1,9 +1,9 @@
import logging

from django.db import IntegrityError

from cio.backends.base import DatabaseBackend
from cio.backends.exceptions import NodeDoesNotExist, PersistenceError

# Use absolute import here or Django 1.7 complains about duplicate models.
from djedi.backends.django.db.models import Node

Expand Down

0 comments on commit a4d8b1a

Please sign in to comment.