Skip to content

Commit

Permalink
Bye travis 👋, hello github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
samjarrett committed Jul 9, 2021
1 parent 302b0c7 commit b9afdb2
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 39 deletions.
5 changes: 5 additions & 0 deletions .github/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
requiredLabels:
- dependencies

reportStatus: true
60 changes: 60 additions & 0 deletions .github/workflows/python_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Test & Publish 📦 to PyPI

on: [push, pull_request]

env:
AWS_DEFAULT_REGION: ap-southeast-2

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.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 dev-requirements.txt
- name: Run lint
run: make lint

- name: Run tests
run: make test

publish:
needs: test
runs-on: ubuntu-latest
env:
python_version: 3.8

steps:
- uses: actions/checkout@v2

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

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build~=0.5.1
- name: Build a binary wheel and a source tarball
run: python -m build --sdist --wheel --outdir dist/ .

- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.

0 comments on commit b9afdb2

Please sign in to comment.