Skip to content

Commit bdf46b2

Browse files
authored
Migrate to GitHub Actions. (#317)
1 parent c48bd0e commit bdf46b2

28 files changed

+523
-565
lines changed

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
if: github.repository == 'jazzband/django-nose'
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: 3.8
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install -U pip
26+
python -m pip install -U setuptools twine wheel
27+
28+
- name: Build package
29+
run: |
30+
python setup.py --version
31+
python setup.py sdist --format=gztar bdist_wheel
32+
twine check dist/*
33+
34+
- name: Upload packages to Jazzband
35+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
36+
uses: pypa/gh-action-pypi-publish@master
37+
with:
38+
user: jazzband
39+
password: ${{ secrets.JAZZBAND_RELEASE_KEY }}
40+
repository_url: https://jazzband.co/projects/django-nose/upload

.github/workflows/test.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
fail-fast: false
10+
max-parallel: 5
11+
matrix:
12+
python-version: ['3.5', '3.6', '3.7', '3.8']
13+
14+
services:
15+
postgres:
16+
image: postgres:10
17+
env:
18+
POSTGRES_USER: postgres
19+
POSTGRES_PASSWORD: postgres
20+
POSTGRES_DB: postgres
21+
ports:
22+
- 5432:5432
23+
options: >-
24+
--health-cmd pg_isready
25+
--health-interval 10s
26+
--health-timeout 5s
27+
--health-retries 5
28+
29+
mariadb:
30+
image: mariadb:10.3
31+
env:
32+
MYSQL_ROOT_PASSWORD: mysql
33+
MYSQL_DATABASE: mysql
34+
options: >-
35+
--health-cmd "mysqladmin ping"
36+
--health-interval 10s
37+
--health-timeout 5s
38+
--health-retries 5
39+
ports:
40+
- 3306:3306
41+
42+
steps:
43+
- uses: actions/checkout@v2
44+
45+
- name: Set up Python ${{ matrix.python-version }}
46+
uses: actions/setup-python@v2
47+
with:
48+
python-version: ${{ matrix.python-version }}
49+
50+
- name: Get pip cache dir
51+
id: pip-cache
52+
run: |
53+
echo "::set-output name=dir::$(pip cache dir)"
54+
55+
- name: Cache
56+
uses: actions/cache@v2
57+
with:
58+
path: ${{ steps.pip-cache.outputs.dir }}
59+
key:
60+
${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/tox.ini') }}
61+
restore-keys: |
62+
${{ matrix.python-version }}-v1-
63+
64+
- name: Install dependencies
65+
run: |
66+
python -m pip install --upgrade pip
67+
python -m pip install --upgrade tox tox-gh-actions
68+
69+
- name: Test with tox
70+
run: tox
71+
env:
72+
COVERAGE: 1
73+
RUNTEST_ARGS: "-v --noinput"
74+
75+
- name: Upload coverage
76+
uses: codecov/codecov-action@v1
77+
with:
78+
name: Python ${{ matrix.python-version }}

.travis.yml

Lines changed: 0 additions & 216 deletions
This file was deleted.

CONTRIBUTING.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ Before you submit a pull request, check that it meets these guidelines:
125125
5. Make liberal use of `git rebase` to ensure clean commits on top of master.
126126
6. The pull request should pass QA tests and work for supported Python / Django
127127
combinations. Check
128-
https://travis-ci.org/jazzband/django-nose/pull_requests
128+
https://github.com/jazzband/django-nose/actions
129129
and make sure that the tests pass for all supported Python versions.
130130

131131
Tips

README.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ django-nose
66
:alt: The PyPI package
77
:target: https://pypi.python.org/pypi/django-nose
88

9-
.. image:: https://img.shields.io/travis/jazzband/django-nose/master.svg
10-
:alt: TravisCI Build Status
11-
:target: https://travis-ci.org/jazzband/django-nose
9+
.. image:: https://github.com/jazzband/django-nose/workflows/Test/badge.svg
10+
:target: https://github.com/jazzband/django-nose/actions
11+
:alt: GitHub Actions
1212

13-
.. image:: https://img.shields.io/coveralls/jazzband/django-nose/master.svg
14-
:alt: Coveralls Test Coverage
15-
:target: https://coveralls.io/r/jazzband/django-nose?branch=master
13+
.. image:: https://codecov.io/gh/jazzband/django-nose/branch/master/graph/badge.svg
14+
:alt: Coverage
15+
:target: https://codecov.io/gh/jazzband/django-nose
1616

1717
.. image:: https://jazzband.co/static/img/badge.svg
1818
:alt: Jazzband

changelog.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Changelog
22
---------
33

4+
unreleased
5+
~~~~~~~~~~
6+
7+
* Dropped Python 2 support.
8+
* Moved CI to
9+
`GitHub Actions <https://github.com/jazzband/django-nose/actions>`_.
10+
411
1.4.7 (2020-08-19)
512
~~~~~~~~~~~~~~~~~~
613
* Document Django 2.2 support, no changes needed

contribute.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"repository": {
55
"url": "https://github.com/jazzband/django-nose",
66
"license": "BSD",
7-
"tests": "https://travis-ci.org/jazzband/django-nose"
7+
"tests": "https://github.com/jazzband/django-nose/actions"
88
},
99
"participate": {
1010
"home": "https://github.com/jazzband/django-nose",

0 commit comments

Comments
 (0)