Skip to content

Commit

Permalink
Replace Travis CI with GitHub Actions (#1229)
Browse files Browse the repository at this point in the history
* Replace Travis CI with GitHub Actions
* Use deadsnakes/action@v2.0.1 to fix 3.9-dev job
  • Loading branch information
hugovk authored Nov 20, 2020
1 parent 61eb515 commit 05c9ec0
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 84 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Set up Python ${{ matrix.python-version }} from deadsnakes
if: endsWith(matrix.python-version, '-dev')
uses: deadsnakes/action@v1.0.0
uses: deadsnakes/action@v2.0.1
with:
python-version: ${{ matrix.python-version }}
- name: Log python version info (${{ matrix.python-version }})
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Deploy

on:
push:
branches:
- master
release:
types:
- published

jobs:
build:
if: github.repository == 'jazzband/pip-tools'
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: deploy-${{ hashFiles('**/setup.py') }}
restore-keys: |
deploy-
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9

- 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: Publish package to Jazzband
if: github.event.action == 'published'
uses: pypa/gh-action-pypi-publish@master

with:
user: jazzband
password: ${{ secrets.JAZZBAND_RELEASE_KEY }}
repository_url: https://jazzband.co/projects/pip-tools/upload
71 changes: 0 additions & 71 deletions .travis.yml

This file was deleted.

8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
|jazzband| |pypi| |pyversions| |buildstatus-travis| |buildstatus-appveyor| |codecov|
|jazzband| |pypi| |pyversions| |buildstatus-gha| |buildstatus-appveyor| |codecov|

==================================
pip-tools = pip-compile + pip-sync
Expand All @@ -10,9 +10,9 @@ even when you've pinned them. You do pin them, right? (In building your Python
.. image:: https://github.com/jazzband/pip-tools/raw/master/img/pip-tools-overview.png
:alt: pip-tools overview for phase II

.. |buildstatus-travis| image:: https://img.shields.io/travis/jazzband/pip-tools/master.svg?logo=travis
:alt: Travis CI build status
:target: https://travis-ci.org/jazzband/pip-tools
.. |buildstatus-gha| image:: https://github.com/jazzband/pip-tools/workflows/CI/badge.svg
:alt: GitHub Actions build status
:target: https://github.com/jazzband/pip-tools/actions?query=workflow%3ACI
.. |buildstatus-appveyor| image:: https://img.shields.io/appveyor/ci/jazzband/pip-tools/master.svg?logo=appveyor
:alt: AppVeyor build status
:target: https://ci.appveyor.com/project/jazzband/pip-tools
Expand Down
9 changes: 1 addition & 8 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
# NOTE: keep this in sync with the env list in .travis.yml for tox-travis.
# NOTE: keep this in sync with the env list in .github/workflows/ci.yml.
py{27,35,36,37,38,39,py,py3}-pip{20.1,20.2,latest,master}-coverage
checkqa
readme
Expand Down Expand Up @@ -39,10 +39,3 @@ commands = pre-commit run --all-files --show-diff-on-failure
deps = twine
commands_pre =
commands = twine check {distdir}/*

[travis:env]
PIP =
20.1: pip20.1
20.2: pip20.2
latest: piplatest
master: pipmaster

0 comments on commit 05c9ec0

Please sign in to comment.