Skip to content

Commit

Permalink
Switch to using GH Actions (#107)
Browse files Browse the repository at this point in the history
This patch switches us away from Travis towards GH Actions for both unit
tests, and publishing.
  • Loading branch information
hkpeprah committed Aug 27, 2021
1 parent 87a3ebb commit 86c7574
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 36 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish Python distributions to TestPyPi and PyPi

on:
release:
types: [ published ]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Test Package
run: |
python setup.py test
- name: Build Package
run: |
python setup.py bdist_wheel
- name: Publish Package
uses: pypa/gh-action-pypi-publish@v1.4.2
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: ./dist/
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Test Builds

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
python-version: [ 2.7, 3.8, 3.9 ]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version}}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint with PyCodeStyle
run: |
pycodestyle .
- name: Run Unit Tests
run: |
python setup.py test
- name: Build a Wheel
run: |
python setup.py bdist_wheel
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

0 comments on commit 86c7574

Please sign in to comment.