Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
joselsegura committed Sep 26, 2020
1 parent be2122e commit f7f81d4
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 4 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/release_workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI for releasing tagged versions

on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'

jobs:
build_dist:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
pip install -U pip setuptools wheel
pip install -e .[dev]
- name: Build dists for Python 3.7
run: |
python setup.py sdist bdist_wheel
ls dist/
- name: Extract tag name
id: tag
run: |
echo ::set-output name=TAG::${GITHUB_REF#refs/tags/}
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag.outputs.TAG }}
release_name: Release ${{ steps.tag.outputs.TAG }}
draft: false
prerelease: false
- name: Upload source distribution
id: upload-source-dist-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/domobot-${{ steps.tag.outputs.TAG }}.tar.gz
asset_name: domobot-${{ steps.tag.outputs.TAG }}.tar.gz
asset_content_type: application/gzip
- name: Upload wheel distribution
id: upload-wheel-dist-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/domobot-${{ steps.tag.outputs.TAG }}-py3-none-any.whl
asset_name: domobot-${{ steps.tag.outputs.TAG }}-py3-none-any.whl
asset_content_type: application/zip
3 changes: 0 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,5 @@ jobs:
run: flake8 . --count --max-complexity=10 --max-line-length=127 --statistics
- name: Lint with pylint
run: pylint domobot
- name: Test with pytest
run: |
pytest
- name: Doc style
run: pydocstyle
1 change: 0 additions & 1 deletion domobot/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

from domobot.config import Config
from domobot.status_garage_door_controller import StatusGarageController
from domobot.fake_garage_door import FakeGarageDoor


def domobot_main():
Expand Down
1 change: 1 addition & 0 deletions domobot/fake_garage_door.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
class FakeGarageDoor:
"""Defines a GarageDoor class that doesn't do anything."""

# pylint: disable=unused-argument
def __init__(self, delay=20.0, **kwargs):
"""Initialize the FakeGarageDoor ignoring all the arguments."""
self.delay = delay
Expand Down

0 comments on commit f7f81d4

Please sign in to comment.