Skip to content

Commit

Permalink
Merge 65ff05f into 38999cd
Browse files Browse the repository at this point in the history
  • Loading branch information
shosca committed Nov 21, 2020
2 parents 38999cd + 65ff05f commit 709b73c
Show file tree
Hide file tree
Showing 7 changed files with 116 additions and 56 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/build.yml
@@ -0,0 +1,51 @@
name: Build

on:
push:
branches:
- master

pull_request:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
container:
- image: python:3.7
toxenv: py37
- image: python:3.8
toxenv: py38
- image: python:3.9
toxenv: py39

container:
image: ${{ matrix.container.image }}

steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Tox
run: |
tox -f ${{ matrix.container.toxenv }}
- name: Upload Coverage
run: coveralls
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
COVERALLS_FLAG_NAME: ${{ matrix.container.image }}
COVERALLS_PARALLEL: true

finish:
needs: build
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Coveralls Finished
run: |
pip3 install -U coveralls
coveralls --finish
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.rst
Expand Up @@ -7,8 +7,8 @@ Django REST Dataclasses

Provides serializers for dataclasses

.. |Build Status| image:: https://travis-ci.com/shosca/django-rest-dataclasses.svg?branch=master
:target: https://travis-ci.com/shosca/django-rest-dataclasses
.. |Build Status| image:: https://github.com/shosca/django-rest-dataclasses/workflows/Build/badge.svg?branch=master
:target: https://github.com/shosca/django-rest-dataclasses/actions?query=workflow%3ABuild+branch%3Amaster
.. |PyPI version| image:: https://badge.fury.io/py/django-rest-dataclasses.svg
:target: https://badge.fury.io/py/django-rest-dataclasses
.. |Coveralls Status| image:: https://coveralls.io/repos/github/shosca/django-rest-dataclasses/badge.svg?branch=master
Expand Down
31 changes: 31 additions & 0 deletions docker-compose.yml
@@ -0,0 +1,31 @@
version: '3.7'

services:
py36: &base
image: python:3.6
working_dir: /code
entrypoint: /code/entrypoint.sh
command: tox -f py36
volumes:
- .:/code
- /tmp:/root/.cache

py37:
image: python:3.7
command: tox -f py37
<<: *base

py38:
image: python:3.8
command: tox -f py38
<<: *base

py39:
image: python:3.9
command: tox -f py39
<<: *base

pypy36:
image: pypy:3.6
command: tox -f pypy36
<<: *base
5 changes: 5 additions & 0 deletions entrypoint.sh
@@ -0,0 +1,5 @@
#!/bin/bash

pip install -r requirements.txt

exec "$@"
21 changes: 12 additions & 9 deletions requirements.txt
@@ -1,17 +1,20 @@
-e .
Sphinx
coreapi
coreschema
coveralls
flake8
flake8-bugbear
flake8-comprehensions
flake8-django
gitchangelog
pre_commit
pdbpp
pytest
pytest-cov
flake8
flake8-bugbear; python_version > '2.7'
simplejson
sphinx-autobuild
gitchangelog
yapf
pdbpp
pre_commit
Sphinx
sphinx_rtd_theme
mock; python_version <= '2.7'
tox
tox-factor
tox-pyenv
coveralls
38 changes: 15 additions & 23 deletions tox.ini
@@ -1,9 +1,9 @@
[tox]
skipsdist = true
envlist =
{py37,py38}-{dj20,dj21,dj22}-{drf38,drf39,drf310}
{py37,py38}-{dj30}-{drf310}
{py37,py38}-{dj31}-{drf311}
{py37,py38,py39}-{dj20,dj21,dj22}-{drf38,drf39,drf310}
{py37,py38,py39}-{dj30}-{drf310}
{py37,py38,py39}-{dj31}-{drf311}

[testenv]
passenv =
Expand All @@ -17,33 +17,25 @@ passenv =
basepython =
py37: python3.7
py38: python3.8
py39: python3.9
deps =
dj11: django<2
dj20: django<2.1
dj21: django<2.2
dj22: django<2.3
dj30: django<3.1
dj31: django<3.2
drf38: djangorestframework<3.9
drf39: djangorestframework<3.10
drf310: djangorestframework<3.11
drf311: djangorestframework<4
dj11: django==1.11.*
dj20: django==2.0.*
dj21: django==2.1.*
dj22: django==2.2.*
dj30: django==3.0.*
dj31: django==3.1.*
drf38: djangorestframework==3.8.*
drf39: djangorestframework==3.9.*
drf310: djangorestframework==3.10.*
drf311: djangorestframework==3.11.*
-rrequirements.txt
setenv =
COVERAGE_FLAGS =
COVERAGE_FLAGS = --cov-fail-under=100
whitelist_externals =
make
commands =
pip freeze
make coverage

[testenv:py37]
setenv =
COVERAGE_FLAGS = --cov-fail-under=100

[testenv:py38]
setenv =
COVERAGE_FLAGS = --cov-fail-under=100

commands_pre =
make lint

0 comments on commit 709b73c

Please sign in to comment.