Skip to content

Commit

Permalink
Merge pull request #89 from NatLibFi/github-actions
Browse files Browse the repository at this point in the history
Switch from Travis CI to GitHub Actions
  • Loading branch information
osma committed Aug 31, 2021
2 parents b79bd47 + af295e7 commit 6f9fb4c
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 18 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Python package

on: [push, pull_request]
jobs:
test-job:
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
run: |
python -m pip install --upgrade pip
python -m pip install .
- name: Test
run: |
python setup.py test
build-and-publish-job:
needs: test-job
runs-on: ubuntu-20.04
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Build distribution
run: |
python -m pip install wheel
python setup.py sdist bdist_wheel
- name: Publish distribution
uses: pypa/gh-action-pypi-publish@release/v1.4
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

0 comments on commit 6f9fb4c

Please sign in to comment.