Skip to content

Commit

Permalink
Merge pull request #67 from keis/github-actions
Browse files Browse the repository at this point in the history
use github actions
  • Loading branch information
keis authored Oct 30, 2021
2 parents 74c7604 + 70f98db commit 7ec464f
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 35 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish
on: push

jobs:
publish:
name: Publish package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

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

- name: Install pypa/build
run: |
python -m pip install build --user
- name: Build a binary wheel and source tarball
run: |
python -m build --sdist --wheel .
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
35 changes: 35 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test

on: [push, pull_request]

jobs:
test:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- '3.6'
- '3.7'
- '3.8'
- '3.9'
- '3.10'
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: |
pip install '.[tests]'
- name: Run MyPy
run: |
mypy . --exclude build
- name: Run tests
run: |
pytest --flake8 --cov=base58 --benchmark-disable .
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

8 changes: 4 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ base58 = py.typed

[options.extras_require]
tests =
pytest>=4.6
pytest-flake8
pytest-cov
mypy
PyHamcrest>=2.0.2
coveralls
pytest>=4.6
pytest-benchmark
pytest-cov
pytest-flake8

[bumpversion:file:setup.cfg]

Expand Down

0 comments on commit 7ec464f

Please sign in to comment.