Skip to content

Commit

Permalink
Github integrations
Browse files Browse the repository at this point in the history
* Add issue template
* Add PR template
* Add github-actions workflows
  • Loading branch information
omab committed Jan 10, 2021
1 parent 192da73 commit a9907e4
Show file tree
Hide file tree
Showing 6 changed files with 193 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!--
Issue template based on the following templates:
* https://raw.githubusercontent.com/theos/theos/master/.github/ISSUE_TEMPLATE.md
* https://raw.githubusercontent.com/EddyVerbruggen/Toast-PhoneGap-Plugin/master/issue_template.md
-->

### Expected behaviour

Describe what should happen.

### Actual behaviour

Describe what happens instead and why is it an issue.

### What are the steps to reproduce this issue?

Input clear steps to reproduce the issue for a maintainer.

1. ...
2. ...
3. ...

### Any logs, error output, etc?

Add any code, log or error output that you see fit for this issue, wrap any code
and / or console output with the proper code blocks.

### Any other comments?

Expand the issue with any details you find appropriate to solve or reproduce it.
38 changes: 38 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!--
Pull request template based on the following templates:
* https://raw.githubusercontent.com/ionic-team/ionic/master/.github/PULL_REQUEST_TEMPLATE.md
* https://raw.githubusercontent.com/appium/appium/master/.github/PULL_REQUEST_TEMPLATE.md
-->

## Proposed changes

Describe the big picture of your changes here to communicate to the maintainers
why we should accept this pull request. If it fixes a bug or resolves a feature
request, be sure to link to that issue.

## Types of changes

Please check the type of change your PR introduces:

- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Code style update (PEP8, lint, formatting, renaming, etc)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Build related changes (build process, tests runner, etc)
- [ ] Other (please describe):

## Checklist

_Put an `x` in the boxes that apply. You can also fill these out after creating
the PR. If you're unsure about any of them, don't hesitate to ask. We're here to
help! This is simply a reminder of what we are going to look for before merging
your code._

- [ ] Lint and unit tests pass locally with my changes
- [ ] I have added tests that prove my fix is effective or that my feature works

## Other information

Any other information that is important to this PR such as screenshots of how
the component looks before and after the change.
17 changes: 17 additions & 0 deletions .github/matchers/flake8.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"problemMatcher": [
{
"owner": "flake8",
"pattern": [
{
"code": 4,
"column": 3,
"file": 1,
"line": 2,
"message": 5,
"regexp": "^([^:]*):(\\d+):(\\d+): (\\w+\\d\\d\\d) (.*)$"
}
]
}
]
}
25 changes: 25 additions & 0 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Flake8

on:
push:
pull_request:

jobs:
flake8:
runs-on: ubuntu-latest

steps:
- uses: actions/[email protected]
- name: Setup Python
uses: actions/[email protected]
with:
python-version: 3.8
- name: Install flake
run: |
python -m pip install --upgrade pip wheel
pip install flake8
- name: Run flake8
run: |
echo "::add-matcher::.github/matchers/flake8.json"
flake8
echo "::remove-matcher owner=flake8::"
52 changes: 52 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Release

on:
release:
types: [published]

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install wheel twine
- name: Verify tag is documented
run: |
CURRENT_TAG=${GITHUB_REF#refs/tags/}
CURRENT_VERSION=$(head -n1 social_django/__init__.py | awk '{print $3}' | sed 's/[^0-9\.]//g')
if [ "${CURRENT_VERSION}" != "${CURRENT_TAG}" ]; then
echo "========================================================================"
echo "Error: tag '${CURRENT_TAG}' and version '${CURRENT_VERSION}' don't match"
echo "========================================================================"
exit 1;
fi
- name: Build dist
run: python setup.py sdist bdist_wheel --python-tag py3

- name: Archive dist
uses: actions/upload-artifact@v2
with:
name: dist
path: |
dist/*.tar.gz
dist/*.whl
- name: Verify long description rendering
run: twine check dist/*

- name: Publish
env:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
run: |
twine upload --non-interactive -u __token__ -p "${PYPI_API_TOKEN}" dist/*
31 changes: 31 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Tests

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [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 System dependencies
run: sudo apt install -qq -y --no-install-recommends libxmlsec1-dev swig

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Test with tox
env:
PYTHON_VERSION: ${{matrix.python-version}}
run: tox -e "py${PYTHON_VERSION/\./}"

0 comments on commit a9907e4

Please sign in to comment.