-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #306 from liampauling/release/2.4.0
github actions added
- Loading branch information
Showing
7 changed files
with
102 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: test | ||
|
||
on: [push, deployment] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install -r requirements.txt | ||
pip install -r requirements-test.txt | ||
- name: Black fmt | ||
run: | | ||
black . --check | ||
- name: Unittest | ||
run: | | ||
python -m unittest discover -s tests | ||
- name: Coverage | ||
run: | | ||
coverage run -m unittest discover | ||
coverage report | ||
deploy: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/master' | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install -r requirements.txt | ||
pip install -r requirements-test.txt | ||
- name: Build package and docs | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine check dist/* | ||
mkdocs build | ||
- name: Publish | ||
run: | | ||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "GitHub Action" | ||
twine upload dist/* | ||
mkdocs gh-deploy --force | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
__title__ = "betfairlightweight" | ||
__description__ = "Lightweight python wrapper for Betfair API-NG" | ||
__url__ = "https://github.com/liampauling/betfair" | ||
__version__ = "2.3.1" | ||
__version__ = "2.4.0" | ||
__author__ = "Liam Pauling" | ||
__license__ = "MIT" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Tests & Linting | ||
black==19.10b0 | ||
coverage | ||
|
||
# Documentation | ||
mkdocs | ||
mkdocs-material | ||
|
||
# Packaging | ||
twine | ||
wheel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
requests<=2.23.0 | ||
ciso8601==2.1.3; sys_platform == 'darwin' or sys_platform == 'linux' | ||
ujson==2.0.3; sys_platform == 'darwin' or sys_platform == 'linux' | ||
ujson==3.0.0; sys_platform == 'darwin' or sys_platform == 'linux' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"jsonrpc":"2.0","result":{"currentOrders":[{"betId":"71958694780","marketId":"1.125875592","selectionId":6412775,"handicap":0.0,"priceSize":{"price":1.22,"size":2.0},"bspLiability":0.0,"side":"LAY","status":"EXECUTION_COMPLETE","persistenceType":"LAPSE","orderType":"LIMIT","placedDate":"2016-07-30T16:21:49.000Z","matchedDate":"2016-07-30T16:21:50.000Z","averagePriceMatched":1.22,"sizeMatched":2.0,"sizeRemaining":0.0,"sizeLapsed":0.0,"sizeCancelled":0.0,"sizeVoided":0.0,"regulatorCode":"GIBRALTAR REGULATOR"}],"moreAvailable":false},"id":1} | ||
{"jsonrpc":"2.0","result":{"currentOrders":[{"betId":"71958694780","marketId":"1.125875592","selectionId":6412775,"handicap":0.0,"priceSize":{"price":1.22,"size":2.0},"bspLiability":0.0,"side":"LAY","status":"EXECUTION_COMPLETE","persistenceType":"LAPSE","orderType":"LIMIT","placedDate":"2016-07-30T16:21:49.000Z","matchedDate":"2016-07-30T16:21:50.000Z","averagePriceMatched":1.22,"sizeMatched":2.0,"sizeRemaining":0.0,"sizeLapsed":0.0,"sizeCancelled":0.0,"sizeVoided":0.0,"regulatorCode":"GIBRALTAR REGULATOR","regulatorAuthCode":"bc000000000000000000"}],"moreAvailable":false},"id":1} |