Skip to content

Commit

Permalink
Merge pull request #22 from nolanbconaway/v0.3
Browse files Browse the repository at this point in the history
v0.3
  • Loading branch information
nolanbconaway authored Apr 6, 2020
2 parents caa3f4f + eaf8dd1 commit 7625f26
Show file tree
Hide file tree
Showing 28 changed files with 502 additions and 540 deletions.
26 changes: 5 additions & 21 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
name: Main Workflow
name: Push

on: push

jobs:
build:
name: Lint, Test, Publish

runs-on: ubuntu-latest
strategy:
max-parallel: 2
matrix:
python-version: [3.6, 3.7, 3.8]

Expand All @@ -23,31 +20,18 @@ jobs:
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
poetry shell
- name: Pylint
run: poetry run pylint underground test -d C0303,C0412,C0330,E1120,R0201,E0213,R0903,R0801

- name: Pydocstyle
run: poetry run pydocstyle underground test/*.py --verbose
pip install --editable .[dev]
- name: Black
run: poetry run black underground test --check --verbose
run: black src test --check --verbose

- name: Pytest
run: poetry run pytest . --cov=./ --cov-report=xml -v
run: pytest --verbose --cov=./ --cov-report=xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1.0.2
with:
token: ${{secrets.CODECOV_TOKEN}}
name: ${{matrix.python-version}}
file: ./coverage.xml

- name: Build and Publish to PyPi
if: startsWith(github.event.ref, 'refs/tags') && matrix.python-version == 3.7
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: poetry publish --no-interaction --build -vvv -u __token__ -p $PYPI_TOKEN
continue-on-error: true # I don't care THAT much about codecov
29 changes: 29 additions & 0 deletions .github/workflows/release_to_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release PyPi Version

on:
release:
types:
- published

jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: "3.7"

- name: Install Dependencies
run: |
pip install --upgrade pip
pip install twine wheel --upgrade
- name: Build Distribution
run: python setup.py sdist bdist_wheel

- name: Publish Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ snapshot.png
.tox
old/
*.lock
dist/
dist/
.python-version
9 changes: 7 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
ignore:
- "test"
- "./setup.py"
- "test/.*"
- "setup.py"
- .venv/
- .tox/

coverage:
status:
project: off
patch: off
36 changes: 0 additions & 36 deletions pyproject.toml

This file was deleted.

Loading

0 comments on commit 7625f26

Please sign in to comment.