mirror of
https://github.com/jazzband/django-configurations.git
synced 2026-03-16 22:20:27 +00:00
commit
78f9824f0c
6 changed files with 107 additions and 42 deletions
53
.github/workflows/release.yml
vendored
Normal file
53
.github/workflows/release.yml
vendored
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: github.repository == 'jazzband/django-configurations'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
|
||||
- name: Get pip cache dir
|
||||
id: pip-cache
|
||||
run: |
|
||||
echo "::set-output name=dir::$(pip cache dir)"
|
||||
|
||||
- name: Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.pip-cache.outputs.dir }}
|
||||
key: release-${{ hashFiles('**/setup.py') }}
|
||||
restore-keys: |
|
||||
release-
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install -U pip
|
||||
python -m pip install -U setuptools twine wheel
|
||||
|
||||
- name: Build package
|
||||
run: |
|
||||
python setup.py --version
|
||||
python setup.py sdist --format=gztar bdist_wheel
|
||||
twine check dist/*
|
||||
|
||||
- name: Upload packages to Jazzband
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
||||
uses: pypa/gh-action-pypi-publish@master
|
||||
with:
|
||||
user: jazzband
|
||||
password: ${{ secrets.JAZZBAND_RELEASE_KEY }}
|
||||
repository_url: https://jazzband.co/projects/django-configurations/upload
|
||||
49
.github/workflows/test.yml
vendored
Normal file
49
.github/workflows/test.yml
vendored
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
name: Test
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 5
|
||||
matrix:
|
||||
python-version: ['2.7', '3.5', '3.6', '3.7', '3.8', 'pypy3']
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Get pip cache dir
|
||||
id: pip-cache
|
||||
run: |
|
||||
echo "::set-output name=dir::$(pip cache dir)"
|
||||
|
||||
- name: Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.pip-cache.outputs.dir }}
|
||||
key:
|
||||
${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }}
|
||||
restore-keys: |
|
||||
${{ matrix.python-version }}-v1-
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install --upgrade tox tox-gh-actions
|
||||
|
||||
- name: Tox tests
|
||||
run: |
|
||||
tox -v
|
||||
|
||||
- name: Upload coverage
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
name: Python ${{ matrix.python-version }}
|
||||
fail_ci_if_error: true
|
||||
37
.travis.yml
37
.travis.yml
|
|
@ -1,37 +0,0 @@
|
|||
language: python
|
||||
dist: xenial
|
||||
cache: pip
|
||||
python:
|
||||
- '2.7'
|
||||
- '3.5'
|
||||
- '3.6'
|
||||
- '3.7'
|
||||
- '3.8'
|
||||
- 'pypy3'
|
||||
install: travis_retry pip install tox-travis codecov
|
||||
script: tox -v
|
||||
after_success: codecov --required -X gcov fix pycov -f coverage.xml --flags ${TOXENV//-/ }
|
||||
branches:
|
||||
except: templates/1.5.x templates/1.6.x
|
||||
stages:
|
||||
- test
|
||||
- name: deploy
|
||||
if: repo = jazzband/django-configurations AND tag IS present
|
||||
jobs:
|
||||
include:
|
||||
- stage: test
|
||||
- stage: deploy
|
||||
install: skip
|
||||
script: skip
|
||||
python: 3.7
|
||||
env: skip
|
||||
deploy:
|
||||
provider: pypi
|
||||
user: jazzband
|
||||
server: https://jazzband.co/projects/django-configurations/upload
|
||||
distributions: sdist bdist_wheel
|
||||
password:
|
||||
secure: LuserSjUTGSsls9zrvck/FbfL+gFpNU/ywOQ/67ufEbbpGCeDBEgxDzgb0acfHNk8wlAkaPvaAejQBFtcUulhdNT/g0NsmaEAjd6HhCGM+FRJAnYFaj33Js6C+N2tX5wznL7uCBxqgtaaH0hf6ucqC8OXqwoCVGgdxAEnUlC/fY=
|
||||
on:
|
||||
tags: true
|
||||
repo: jazzband/django-configurations
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
include README.rst
|
||||
include CONTRIBUTING.md
|
||||
include AUTHORS
|
||||
include .travis.yml
|
||||
include tox.ini
|
||||
recursive-include tests *
|
||||
recursive-include docs *
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ Check out the `documentation`_ for more complete examples.
|
|||
.. |latest-version| image:: https://img.shields.io/pypi/v/django-configurations.svg
|
||||
:alt: Latest version on PyPI
|
||||
:target: https://pypi.python.org/pypi/django-configurations
|
||||
.. |build-status| image:: https://img.shields.io/travis/jazzband/django-configurations/master.svg
|
||||
:alt: Build status
|
||||
:target: https://travis-ci.org/jazzband/django-configurations
|
||||
.. |build-status| image:: https://github.com/jazzband/django-configurations/workflows/Test/badge.svg
|
||||
:target: https://github.com/jazzband/django-configurations/actions
|
||||
:alt: GitHub Actions
|
||||
.. |codecov| image:: https://codecov.io/github/jazzband/django-configurations/coverage.svg?branch=master
|
||||
:alt: Codecov
|
||||
:target: https://codecov.io/github/jazzband/django-configurations?branch=master
|
||||
|
|
|
|||
3
tox.ini
3
tox.ini
|
|
@ -11,7 +11,7 @@ envlist =
|
|||
py{35,36,37,38,py3}-dj22
|
||||
py{36,37,38,py3}-dj{30,master}
|
||||
|
||||
[travis]
|
||||
[gh-actions]
|
||||
python =
|
||||
2.7: py27
|
||||
3.5: py35
|
||||
|
|
@ -28,6 +28,7 @@ setenv =
|
|||
COVERAGE_PROCESS_START = {toxinidir}/setup.cfg
|
||||
deps =
|
||||
dj111: django>=1.11,<2.0
|
||||
dj111: dj-email-url<1.0.0
|
||||
dj20: django>=2.0a1,<2.1
|
||||
dj21: django>=2.1a1,<2.2
|
||||
dj22: django>=2.2a1,<3.0
|
||||
|
|
|
|||
Loading…
Reference in a new issue