-
Notifications
You must be signed in to change notification settings - Fork 26
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 #73 from Julius2342/githubci
Added ci workflow
- Loading branch information
Showing
45 changed files
with
202 additions
and
130 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,99 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' # run on all branches | ||
pull_request: | ||
branches: | ||
- '**' # run on all branches | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.8, 3.9] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Cache pip packages | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-pypi-modules | ||
with: | ||
# pip cache files are stored in `~/.cache/pip` on Linux | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('requirements/production.txt', 'requirements/testing.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
- name: Cache pre-commit packages | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-pre-commit | ||
with: | ||
# pre-commit cache files are usually stored in `~/.cache/pre-commit` on Linux | ||
path: ~/.cache/pre-commit | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('.pre-commit-config.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
- name: Install dependencies | ||
run: | | ||
pip install -r requirements/testing.txt | ||
- name: CI | ||
run: | | ||
tox | ||
- name: Upload coverage artifact | ||
uses: actions/upload-artifact@v2.2.2 | ||
with: | ||
name: coverage-${{ matrix.python-version }} | ||
path: .coverage | ||
|
||
coverage: | ||
name: Process test coverage | ||
runs-on: ubuntu-latest | ||
needs: ["build"] | ||
strategy: | ||
matrix: | ||
python-version: [3.8] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Cache pip packages | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-pypi-modules | ||
with: | ||
# pip cache files are stored in `~/.cache/pip` on Linux | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('requirements/production.txt', 'requirements/testing.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
- name: Cache pre-commit packages | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-pre-commit | ||
with: | ||
# pre-commit cache files are usually stored in `~/.cache/pre-commit` on Linux | ||
path: ~/.cache/pre-commit | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('.pre-commit-config.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
- name: Install dependencies | ||
run: | | ||
pip install -r requirements/testing.txt | ||
- name: Download all coverage artifacts | ||
uses: actions/download-artifact@v2 | ||
- name: Create coverage report | ||
run: | | ||
coverage combine coverage*/.coverage* | ||
coverage report --fail-under=94 | ||
coverage xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1.3.2 |
This file was deleted.
Oops, something went wrong.
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
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,21 +1,22 @@ | ||
"""Module for all KLF 200 API frames.""" | ||
# flake8: noqa | ||
|
||
from .house_status_monitor import (house_status_monitor_enable, house_status_monitor_disable) | ||
from .command_send import (CommandSend) | ||
from .get_local_time import (FrameGetLocalTimeRequest, FrameGetLocalTimeConfirmation) | ||
from .get_state import (GetState) | ||
from .get_network_setup import (GetNetworkSetup) | ||
from .get_protocol_version import (GetProtocolVersion) | ||
from .get_version import (GetVersion) | ||
from .get_local_time import (GetLocalTime) | ||
from .leave_learn_state import (LeaveLearnState) | ||
from .factory_default import (FactoryDefault) | ||
from .password_enter import (PasswordEnter) | ||
from .set_utc import (SetUTC) | ||
from .reboot import (Reboot) | ||
from .activate_scene import (ActivateScene) | ||
from .set_node_name import (SetNodeName) | ||
from .get_all_nodes_information import (GetAllNodesInformation) | ||
from .get_node_information import (GetNodeInformation) | ||
from .get_scene_list import (GetSceneList) | ||
from .activate_scene import ActivateScene | ||
from .command_send import CommandSend | ||
from .factory_default import FactoryDefault | ||
from .get_all_nodes_information import GetAllNodesInformation | ||
from .get_local_time import ( | ||
FrameGetLocalTimeConfirmation, FrameGetLocalTimeRequest, GetLocalTime) | ||
from .get_network_setup import GetNetworkSetup | ||
from .get_node_information import GetNodeInformation | ||
from .get_protocol_version import GetProtocolVersion | ||
from .get_scene_list import GetSceneList | ||
from .get_state import GetState | ||
from .get_version import GetVersion | ||
from .house_status_monitor import ( | ||
house_status_monitor_disable, house_status_monitor_enable) | ||
from .leave_learn_state import LeaveLearnState | ||
from .password_enter import PasswordEnter | ||
from .reboot import Reboot | ||
from .set_node_name import SetNodeName | ||
from .set_utc import SetUTC |
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
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
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
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
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
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
Oops, something went wrong.