Skip to content

Commit

Permalink
Migrate to GitHub Actions. (#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
jezdez authored Dec 9, 2020
1 parent c48bd0e commit bdf46b2
Show file tree
Hide file tree
Showing 28 changed files with 523 additions and 565 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release

on:
push:
tags:
- '*'

jobs:
build:
if: github.repository == 'jazzband/django-nose'
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: 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-nose/upload
78 changes: 78 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Test

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 5
matrix:
python-version: ['3.5', '3.6', '3.7', '3.8']

services:
postgres:
image: postgres:10
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
mariadb:
image: mariadb:10.3
env:
MYSQL_ROOT_PASSWORD: mysql
MYSQL_DATABASE: mysql
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 3306:3306

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') }}-${{ hashFiles('**/tox.ini') }}
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: Test with tox
run: tox
env:
COVERAGE: 1
RUNTEST_ARGS: "-v --noinput"

- name: Upload coverage
uses: codecov/codecov-action@v1
with:
name: Python ${{ matrix.python-version }}
216 changes: 0 additions & 216 deletions .travis.yml

This file was deleted.

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

Tips
Expand Down
12 changes: 6 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ django-nose
:alt: The PyPI package
:target: https://pypi.python.org/pypi/django-nose

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

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

.. image:: https://jazzband.co/static/img/badge.svg
:alt: Jazzband
Expand Down
7 changes: 7 additions & 0 deletions changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Changelog
---------

unreleased
~~~~~~~~~~

* Dropped Python 2 support.
* Moved CI to
`GitHub Actions <https://github.com/jazzband/django-nose/actions>`_.

1.4.7 (2020-08-19)
~~~~~~~~~~~~~~~~~~
* Document Django 2.2 support, no changes needed
Expand Down
2 changes: 1 addition & 1 deletion contribute.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"url": "https://github.com/jazzband/django-nose",
"license": "BSD",
"tests": "https://travis-ci.org/jazzband/django-nose"
"tests": "https://github.com/jazzband/django-nose/actions"
},
"participate": {
"home": "https://github.com/jazzband/django-nose",
Expand Down
Loading

0 comments on commit bdf46b2

Please sign in to comment.