Skip to content

Commit

Permalink
Merge pull request #121 from pypa/gh-actions
Browse files Browse the repository at this point in the history
Switch CI from Travis to GitHub actions
  • Loading branch information
takluyver committed Jul 17, 2021
2 parents edff9c4 + 721d3d0 commit 5692cf4
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 35 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Tests

on: [push, pull_request]

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install Tox
run: |
pip install tox tox-venv
- name: Run tests
run: tox -e python

publish:
runs-on: ubuntu-latest
needs: tests
if: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install Tox
run: |
pip install tox tox-venv
- name: Publish to PyPI
run: tox -e release
env:
FLIT_USERNAME: __token__
FLIT_PASSWORD: ${{ secrets.PYPI_TOKEN }}
TOX_TESTENV_PASSENV: "FLIT_USERNAME FLIT_PASSWORD"
35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

0 comments on commit 5692cf4

Please sign in to comment.