Skip to content

Commit

Permalink
Create unittests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
psilo909 authored May 10, 2022
1 parent 461bf96 commit 852ab56
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: "SmartHomeNG Unittest Workflow Plugins"
on: [workflow_dispatch, push]
#on:
# workflow_dispatch:
# push:
env:
DEP_PATH: smarthomeng/requirements/all.txt
jobs:
build:
runs-on: ubuntu-20.04 #latest
strategy:
fail-fast: false
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10' ]
name: Python ${{ matrix.python-version }}
steps:
- name: update OS (Ubuntu)
run: sudo apt-get update
- run: sudo apt-get install libudev-dev
- run: sudo apt-get install librrd-dev libpython3-dev
- run: sudo apt-get install gcc --only-upgrade
- uses: actions/checkout@v2
#- name: Checkout SmartHomeNG DEVELOP Branch
# uses: actions/checkout@v2
# with:
# repository: smarthomeNG/smarthome
# ref: develop
# path: smarthomeng
- name: Checkout SmartHomeNG/plugins DEVELOP Branch
uses: actions/checkout@v2
with:
repository: smarthomeNG/plugins
ref: develop
path: smarthomeng/plugins
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Print Python Version
run: python --version
- run: python3 -m pip install --upgrade pip #==19.3.1
#- run: pip install tox-travis virtualenv>=20.0.8 --upgrade
- run: pip install sphinx sphinx_rtd_theme recommonmark ruamel.yaml pytest
- name: Build Requirements
run: python3 smarthomeng/tools/build_requirements.py
- name: Show requirements/base.txt
run: head smarthomeng/requirements/base.txt -n 12
- name: Show requirements/all.txt
run: head smarthomeng/requirements/all.txt -n 12
- name: Install base.txt
run: pip install -r smarthomeng/requirements/base.txt
- name: Run Python Unittests
working-directory: ./smarthomeng/plugins
run: pytest

0 comments on commit 852ab56

Please sign in to comment.