Skip to content

GitHub actions #340

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

Merged
merged 21 commits into from
Dec 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
38a3b08
Ignoring some local dev paths
carlio Dec 28, 2021
94480e0
Newer pylint test versions expect additional columns in expected test…
carlio Dec 28, 2021
b0af386
Adding pre-commit config
carlio Dec 28, 2021
1345b26
Migrate from Travis CI to GitHub Actions
atodorov Nov 11, 2021
3f89f8e
Pylint fixes
atodorov Nov 11, 2021
3bc44a6
Fix quotes in tox.ini
atodorov Nov 11, 2021
0a9cb12
Don't crash if Django isn't installed
atodorov Nov 11, 2021
1d7cc8a
tox: Update a text constant for grep
atodorov Nov 11, 2021
07be719
Add wheel as test dependency
atodorov Nov 11, 2021
e9ae2c6
Adjust how we build TOXENV in CI
atodorov Nov 18, 2021
11469a4
Use different tool to publish coverage report to Coveralls
atodorov Nov 18, 2021
d99da70
Pylint fixes
carlio Dec 28, 2021
9c3b5fc
After re-formatting the files using black, the expected output locati…
carlio Dec 28, 2021
d6bb605
Added a coveralls token to the project secrets
carlio Dec 28, 2021
448cbea
YAML parsing was convering 2.0 into integer 2, resulting in trying to…
carlio Dec 28, 2021
7ac677f
Trying to fix coveralls submissions (found from https://github.com/le…
carlio Dec 28, 2021
bb3cb1e
Default branches for astroid, django and pylint were renamed from 'ma…
carlio Dec 28, 2021
55ca488
Need some backwards compat in urls test depending on which version of…
carlio Dec 28, 2021
7daded0
something strange is happening with yaml parsing quoted values, so tr…
carlio Dec 28, 2021
84e6a1c
Updating README and removing travis from tox, as well as travis confi…
carlio Dec 28, 2021
ac2f70a
Oops
carlio Dec 28, 2021
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
87 changes: 87 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: testing

on:
push:
branches: master
pull_request:

jobs:
sanity:
name: sanity / ${{ matrix.toxenv }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.6]
toxenv: [django_not_installed, django_is_installed, flake8, pylint, readme]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Execute tests
run: |
pip install tox
pip install -e .[for_tests]

export TOXENV=${{ matrix.toxenv }}
export PYTHON=${{ matrix.python-version }}
tox


test:
name: test / Django@${{ matrix.django-version }} / Python@${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
django-version: [-main, 3.2, 3.1, "3.0", "2.0", 1.11]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Execute tests
run: |
pip install tox
pip install -e .[for_tests]

export DJANGO=${{ matrix.django-version }}
export PYTHON=${{ matrix.python-version }}
export TOXENV=$(echo py${{ matrix.python-version }}-django${{ matrix.django-version }} | tr -d .)
tox

- name: Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install coveralls
coveralls --service=github

build_and_package_sanity:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Build
run: |
pip install tox
pip install -e .[for_tests]

./scripts/build.sh
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ nosetests.xml
.project
.pydevproject
.env
.idea
env.txt
.venv
26 changes: 26 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# https://pre-commit.com/
repos:
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix=lf]
- id: debug-statements
# code formatting
- repo: https://gitlab.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
args: [ --max-line-length=140 ]
- repo: https://github.com/python/black
rev: 21.9b0
hooks:
- id: black
args: [--safe, --line-length=140]
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
args: ['--profile', 'black']
57 changes: 0 additions & 57 deletions .travis.yml

This file was deleted.

7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Changelog
=========

Version 2.5 [WIP]
---------------------------
- Moved from Travis CI to GitHub Actions (`#366 <https://github.com/PyCQA/pylint-django/pull/366>`_ and `#340 <https://github.com/PyCQA/pylint-django/pull/340>`_)
- Added pre-commit configuration and began enforcing black/isort code formatting (TODO: add github action to enforce)
- Multiple test fixes (including `#338 <https://github.com/PyCQA/pylint-django/issues/338>`_) - newer versions of pylint expect a different format for the expected messages txt files.
- TODO: Bumped dependency for pylint-django-utils to get `multi-threaded pylint support <https://github.com/PyCQA/pylint-plugin-utils/pull/21>`_

Version 2.4.4 (26 Apr 2021)
---------------------------

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

Pylint plugin for improving code analysis for when using Django
Copyright (C) 2013
Copyright (C) 2013

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
7 changes: 2 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
pylint-django
=============

.. image:: https://travis-ci.org/PyCQA/pylint-django.svg?branch=master
:target: https://travis-ci.org/PyCQA/pylint-django

.. image:: https://landscape.io/github/landscapeio/pylint-django/master/landscape.png
:target: https://landscape.io/github/landscapeio/pylint-django
.. image:: https://github.com/PyCQA/pylint-django/actions/workflows/testing.yml/badge.svg
:target: https://github.com/PyCQA/pylint-django/actions/workflows/testing.yml

.. image:: https://coveralls.io/repos/PyCQA/pylint-django/badge.svg
:target: https://coveralls.io/r/PyCQA/pylint-django
Expand Down
5 changes: 2 additions & 3 deletions pylint_django/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@

from pylint_django import plugin

if sys.version_info < (3, ):
raise DeprecationWarning("Version 0.11.1 was the last to support Python 2. "
"Please migrate to Python 3!")
if sys.version_info < (3,):
raise DeprecationWarning("Version 0.11.1 was the last to support Python 2. " "Please migrate to Python 3!")

register = plugin.register # pylint: disable=invalid-name
load_configuration = plugin.load_configuration # pylint: disable=invalid-name
Loading