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

Actions #741

Merged
merged 11 commits into from
Sep 22, 2021
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: 'Bug Report'
about: Report a bug
---

# Bug Report

## Description

<!-- edit: --> A clear and concise description of the problem...

## Is this a regression?

<!-- Did this behavior use to work in the previous version? -->
<!-- edit: --> Yes, the previous version in which this bug was not present was: ...

## Minimal Reproduction

```code

```

## Stack trace / Error message

```code

```

<!-- If the issue is accompanied by an exception or an error, please share it below: -->

## Your Environment

```code

```
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: 'Feature Request'
about: Suggest a feature
---

# Feature Request

## Description

<!-- edit: --> A clear and concise description of the problem or missing capability...

## Describe the solution you'd like

<!-- edit: --> If you have a solution in mind, please describe it.

## Describe alternatives you've considered

<!-- edit: --> Have you considered any alternative solutions or workarounds?
31 changes: 31 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/general.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# PR Checklist

Please check if your PR fulfills the following requirements:

- [ ] The commit message follows our contributing guidelines
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)

## PR Type

What kind of change does this PR introduce?

- [ ] Bugfix
- [ ] Feature
- [ ] Code style update
- [ ] Refactoring (no functional changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Documentation content changes
- [ ] Other

## What is the current behavior?

## What is the new behavior?

## Does this PR introduce a breaking change?

- [ ] Yes
- [ ] No

## Other information
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish

on:
push:
tags:
- "v*.*.*"

jobs:
publish:
name: Publish the package on pypi
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v2

- name: Set the python version
uses: actions/setup-python@v2
with:
python-version: 3.6
JoelLefkowitz marked this conversation as resolved.
Show resolved Hide resolved

- name: Install pip dependencies
run: pip install -r requirements/publish.txt

- name: Build the distributions
run: python setup.py sdist bdist_wheel

- name: Publish the package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
johnthagen marked this conversation as resolved.
Show resolved Hide resolved
33 changes: 33 additions & 0 deletions .github/workflows/review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Review

on: [push, pull_request]

jobs:
review:
name: Run linters and tests
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.6, 3.7, 3.8, 3.9]

steps:
- name: Set up pip package caching
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: ${{ runner.os }}-pip-

- name: Checkout the source code
uses: actions/checkout@v2

- name: Set the python version
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}

- name: Install pip dependencies
run: pip install -r requirements/ci.txt

- name: Run unit tests
run: tox
70 changes: 0 additions & 70 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,4 +321,4 @@ def role_github_pull_request_or_issue(name, rawtext, text, lineno, inliner, opti


def setup(app):
app.add_stylesheet('css/style.css')
app.add_css_file('css/style.css')
8 changes: 4 additions & 4 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
coreapi>=2.3.3
coreschema>=0.0.4
djangorestframework>=3.10.3
django>=2.2.16
ruamel.yaml>=0.15.34
inflection>=0.3.1
packaging>=21.0
pytz>=2021.1
uritemplate>=3.0.0
packaging

djangorestframework>=3.10.3
Django>=2.2.16
1 change: 0 additions & 1 deletion requirements/ci.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# requirements for the CI test runner
tox-travis>=0.10
codecov>=2.0.9

-r tox.txt
1 change: 1 addition & 0 deletions requirements/publish.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
wheel>=0.37.0
11 changes: 8 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@ isolated_build_env = .package
envlist =
py{36,37,38,39}-django{22,30}-drf{310,311,312},
py{36,37,38,39}-django31-drf{311,312},
johnthagen marked this conversation as resolved.
Show resolved Hide resolved
djmaster, lint, docs
py38-{lint, docs},
py39-djmaster

skip_missing_interpreters = true

[testenv:.package]
# no additional dependencies besides PEP 517
deps =

[testenv:py39-djmaster]
ignore_outcome = true

[testenv]
deps =
django22: Django>=2.2,<2.3
Expand All @@ -28,8 +33,8 @@ deps =

# test with the latest builds of Django and django-rest-framework
# to get early warning of compatibility issues
djmaster: https://github.com/django/django/archive/master.tar.gz
djmaster: https://github.com/ottoyiu/django-cors-headers/archive/master.tar.gz
djmaster: https://github.com/django/django/archive/main.tar.gz
djmaster: https://github.com/ottoyiu/django-cors-headers/archive/main.tar.gz
JoelLefkowitz marked this conversation as resolved.
Show resolved Hide resolved
djmaster: https://github.com/encode/django-rest-framework/archive/master.tar.gz

# other dependencies
Expand Down