Skip to content

Commit

Permalink
Merge pull request #103 from pybitcash/actions
Browse files Browse the repository at this point in the history
  • Loading branch information
merc1er committed Jun 18, 2021
2 parents 30ac9a1 + 091551a commit 4fd9a7d
Show file tree
Hide file tree
Showing 11 changed files with 80 additions and 106 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/deploy_docs.yml
@@ -0,0 +1,30 @@
name: Build and deploy docs

on:
push:
branches:
- master

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1

- name: Install dependencies
run: |
pip install sphinx
pip install .
- name: Build
run: |
cd docs
make clean
make html
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: gh-pages
folder: docs/build/html
40 changes: 40 additions & 0 deletions .github/workflows/run_tests.yml
@@ -0,0 +1,40 @@
name: Run tests

on: push

jobs:
test:
strategy:
fail-fast: false # still run the other versions of Python if one fails
matrix:
python: [3.6, 3.7, 3.8, 3.9]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Install coverage and pytest
run: pip install coverage pytest
- name: Run tests
run: |
coverage run -m pytest -m "not regtest" -rw
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
name: codecov-umbrella
fail_ci_if_error: true
- name: Publish to PyPI
uses: casperdcl/deploy-pypi@v2
with:
password: ${{ secrets.PYPI_TOKEN }}
pip: wheel -w dist/ --no-deps .
# only upload if a tag is pushed (otherwise just build & check)
upload: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') }}
40 changes: 0 additions & 40 deletions .travis.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .travis/deploy_docs.sh

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -5,7 +5,8 @@
<a href="https://pypi.org/project/bitcash" target="_blank">
<img src="https://img.shields.io/pypi/v/bitcash.svg?style=flat-square" alt="BitCash PyPi version">
</a>
<img src="https://img.shields.io/travis/pybitcash/bitcash.svg?branch=master&style=flat-square" alt="Build status">
<img src="https://github.com/pybitcash/bitcash/actions/workflows/run_tests.yml/badge.svg" alt="Test status">
<img src="https://github.com/pybitcash/bitcash/actions/workflows/deploy_docs.yml/badge.svg" alt="Deploy docs">
<img src="https://codecov.io/gh/pybitcash/bitcash/branch/master/graph/badge.svg" alt="Code Coverage">
<img src="https://img.shields.io/pypi/pyversions/bitcash.svg?style=flat-square" alt="Python Versions">
<img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" alt="MIT license">
Expand Down Expand Up @@ -68,8 +69,7 @@ $ pip install bitcash # pip3 if pip is Python 2 on your system.

## Documentation

Docs are hosted by Github Pages and are automatically built and published
by Travis after every successful commit to BitCash's ``master`` branch.
Docs are hosted by Github Pages and are automatically built and published after every successful commit to BitCash's ``master`` branch.

[Read the documentation](https://pybitcash.github.io/bitcash/)

Expand Down
Empty file.
8 changes: 4 additions & 4 deletions docs/source/community/development.rst
Expand Up @@ -12,21 +12,21 @@ Philosophy
Continuous Integration
----------------------

`Travis CI`_ is used for testing and `Codecov`_ is used for detailing code
`GitHub actions`_ is used for testing and `Codecov`_ is used for detailing code
coverage.

Documentation
-------------

Docs are hosted by `GitHub Pages`_ and are automatically built and published
by Travis after every successful commit to bitcash's ``master`` branch.
by GitHub actions after every successful commit to bitcash's ``master`` branch.

Version Scheme
--------------

BitCash tries to adhere to `semantic versioning`_ as much as possible.

.. _Travis CI: https://travis-ci.org
.. _GitHub actions: https://github.com/features/actions
.. _Codecov: https://codecov.io
.. _GitHub Pages: https://pages.github.com
.. _semantic versioning: https://goo.gl/iQwd4o
.. _semantic versioning: https://semver.org
2 changes: 1 addition & 1 deletion docs/source/conf.py
Expand Up @@ -52,7 +52,7 @@

# General information about the project.
project = 'bitcash'
copyright = '2020, BitCash'
copyright = '2021, BitCash'
author = 'Teran McKinney'

# The version info for the project you're documenting, acts as replacement for
Expand Down
4 changes: 2 additions & 2 deletions docs/source/index.rst
Expand Up @@ -9,8 +9,8 @@ Version |version|.
.. image:: https://img.shields.io/pypi/pyversions/bitcash.svg?style=flat-square
:target: https://pypi.org/project/bitcash

.. image:: https://travis-ci.org/pybitcash/bitcash.svg?branch=master
:target: https://travis-ci.org/pybitcash/bitcash
.. image:: https://github.com/pybitcash/bitcash/actions/workflows/run_tests.yml/badge.svg
:target: https://github.com/pybitcash/bitcash/actions/workflows/run_tests.yml

.. image:: https://img.shields.io/codecov/c/github/pybitcash/bitcash.svg?style=flat-square

Expand Down
2 changes: 0 additions & 2 deletions tests/test_wallet.py
Expand Up @@ -39,8 +39,6 @@
BITCOIN_ADDRESS_REGTEST_PAY2SH,
)

TRAVIS = "TRAVIS" in os.environ


class TestWIFToKey:
def test_compressed_main(self):
Expand Down
15 changes: 0 additions & 15 deletions tox.ini

This file was deleted.

0 comments on commit 4fd9a7d

Please sign in to comment.