Skip to content

Commit

Permalink
Coverage (#6)
Browse files Browse the repository at this point in the history
* coverage

* fix

* fix

* fix

* pypi token

* fix

* fix
  • Loading branch information
kigawas authored May 30, 2020
1 parent 7f9fd14 commit a943f56
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 6 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,26 @@ jobs:

steps:
- uses: actions/checkout@v2

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
poetry run pip install pytest-cov
- name: Lint with flake8
run: |
poetry run flake8 bip44 --exit-zero --count --show-source --statistics
- name: Test with pytest
run: |
poetry run pytest
poetry run pytest --cov=bip44 --cov-report xml
- name: Upload to codecov
uses: codecov/codecov-action@v1
13 changes: 13 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,32 @@ jobs:

steps:
- uses: actions/checkout@v2

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Test with pytest
run: |
pytest
- name: Publish
env:
TEST_PYPI_TOKEN: ${{ secrets.TEST_PYPI_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
poetry build
poetry config repositories.testpypi https://test.pypi.org/legacy/
poetry config pypi-token.testpypi "$TEST_PYPI_TOKEN"
poetry config pypi-token.pypi "$PYPI_TOKEN"
poetry publish --repository testpypi
poetry publish
54 changes: 49 additions & 5 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ mypy = "^0.770"
flake8 = "^3.8.2"
ipython = "^7.14.0"
pytest = "^5.4.2"
coverage = "^5.1"

[build-system]
requires = ["poetry>=0.12"]
Expand Down

0 comments on commit a943f56

Please sign in to comment.