Do not include captcha field in email context #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test and release | |
# Fires on all incoming commits | |
on: | |
pull_request: | |
push: | |
jobs: | |
# Test all supported Python & Django versions | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# Django 2.2 | |
- tox-env: "py36-dj22" | |
python-version: "3.6" | |
- tox-env: "py37-dj22" | |
python-version: "3.7" | |
- tox-env: "py38-dj22" | |
python-version: "3.8" | |
- tox-env: "py39-dj22" | |
python-version: "3.9" | |
# Django 3.0 | |
- tox-env: "py36-dj30" | |
python-version: "3.6" | |
- tox-env: "py37-dj30" | |
python-version: "3.7" | |
- tox-env: "py38-dj30" | |
python-version: "3.8" | |
- tox-env: "py39-dj30" | |
python-version: "3.9" | |
# Django 3.1 | |
- tox-env: "py36-dj31" | |
python-version: "3.6" | |
- tox-env: "py37-dj31" | |
python-version: "3.7" | |
- tox-env: "py38-dj31" | |
python-version: "3.8" | |
- tox-env: "py39-dj31" | |
python-version: "3.9" | |
# Django 3.2 | |
- tox-env: "py36-dj32" | |
python-version: "3.6" | |
- tox-env: "py37-dj32" | |
python-version: "3.7" | |
- tox-env: "py38-dj32" | |
python-version: "3.8" | |
- tox-env: "py39-dj32" | |
python-version: "3.9" | |
- tox-env: "py310-dj32" | |
python-version: "3.10" | |
# Django 4.0 | |
- tox-env: "py38-dj40" | |
python-version: "3.8" | |
- tox-env: "py39-dj40" | |
python-version: "3.9" | |
- tox-env: "py310-dj40" | |
python-version: "3.10" | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: pip install -U pip tox | |
- name: Run tests | |
run: tox -e ${{ matrix.tox-env }} | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v2 | |
with: | |
report_paths: '**/junit/TEST-*.xml' | |
# Lint | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: pip install tox -U pip | |
- name: Lint | |
run: tox -e package -e lint -e pyupgrade | |
# Build docs | |
docs: | |
name: Build docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install deps | |
run: pip install -e . && pip install sphinx | |
- name: Build docs | |
run: sphinx-build -b html docs docs/build | |
# Create a new semantic release | |
# Only runs on the original repo, not forks | |
release: | |
if: github.repository_owner == 'stephenmcd' | |
needs: [test, lint, docs] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '14' # https://github.com/cycjimmy/semantic-release-action/issues/79#issuecomment-955463633 | |
- uses: cycjimmy/semantic-release-action@v2 | |
with: | |
semantic_version: 18 | |
extra_plugins: | | |
@semantic-release/exec@5 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} |