Skip to content

Commit

Permalink
chore: migrate from travis to github ci
Browse files Browse the repository at this point in the history
  • Loading branch information
eshaan7 committed Dec 18, 2020
1 parent ea507fa commit aefbf6e
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 40 deletions.
4 changes: 3 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[flake8]
max-line-length = 88
exclude =
*migrations*,
*migrations*
*venv*
virtualenv
docs
.tox
isort*
38 changes: 38 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Linter & Tests

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 5
matrix:
python-version: ['3.5', '3.6', '3.7', '3.8', '3.9']

steps:
- uses: actions/checkout@v2

- 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 tox tox-gh-actions flake8 codecov
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count
- name: Run tox tests
run: |
# run tests with coverage
tox
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
37 changes: 0 additions & 37 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include README.md
include LICENSE
include CONTRIBUTORS
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#
import os
import sys

import django

# I've simplified this a little to use append instead of insert.
Expand Down
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
## Docs & Example Usage: https://github.com/eshaan7/django-rest-durin
"""
import os

from setuptools import find_packages, setup

# Get the long description from the relevant file
with open("README.md", encoding="utf-8") as f:
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, "README.md"), encoding="utf-8") as f:
long_description = f.read()

GITHUB_URL = "https://github.com/eshaan7/django-rest-durin"
Expand Down
10 changes: 9 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
isort
isort,
flake8,
py{35,36,37,38,39}-django22,
py{36,37,38,39}-django30
Expand Down Expand Up @@ -36,6 +36,14 @@ deps =
twine
wheel

[gh-actions]
python =
3.5: py35
3.6: py36
3.7: py37
3.8: py38
3.9: py39, isort, flake8

# Configuration for coverage and flake8 is being set in `./setup.cfg`
[testenv:codecov]
passenv = TOXENV CI TRAVIS TRAVIS_* CODECOV_*
Expand Down

0 comments on commit aefbf6e

Please sign in to comment.