Merge pull request #122 from brentru/fix-env-monitor
Update environmental monitor example
This commit is contained in:
commit
8df85246d3
2 changed files with 11 additions and 5 deletions
12
.github/workflows/build.yml
vendored
12
.github/workflows/build.yml
vendored
|
|
@ -8,26 +8,32 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Set up Python 3.6
|
- name: Set up Python 3.6
|
||||||
uses: actions/setup-python@v1
|
uses: actions/setup-python@v1
|
||||||
with:
|
with:
|
||||||
python-version: 3.6
|
python-version: 3.6
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||||
|
|
||||||
- name: Install library
|
- name: Install library
|
||||||
run: python3 setup.py install
|
run: python3 setup.py install
|
||||||
|
|
||||||
- name: Install sphinx
|
- name: Install sphinx
|
||||||
run: pip3 install pylint Sphinx sphinx-rtd-theme
|
run: pip3 install pylint Sphinx sphinx-rtd-theme
|
||||||
- name: Run all unittests
|
|
||||||
env:
|
- name: Run unittests
|
||||||
|
env:
|
||||||
SECRET_IO_KEY: ${{ secrets.CI_IO_KEY }}
|
SECRET_IO_KEY: ${{ secrets.CI_IO_KEY }}
|
||||||
SECRET_IO_USER: ${{ secrets.CI_IO_USERNAME }}
|
SECRET_IO_USER: ${{ secrets.CI_IO_USERNAME }}
|
||||||
run: |
|
run: |
|
||||||
cd tests/
|
cd tests/
|
||||||
ADAFRUIT_IO_KEY="$SECRET_IO_KEY" ADAFRUIT_IO_USERNAME="$SECRET_IO_USER" python -m unittest discover
|
ADAFRUIT_IO_KEY=$SECRET_IO_KEY ADAFRUIT_IO_USERNAME=$SECRET_IO_USER python -m unittest discover
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
- name: Generate documentation
|
- name: Generate documentation
|
||||||
run: |
|
run: |
|
||||||
cd docs && sphinx-build -E -W -b html . _build/html && cd ..
|
cd docs && sphinx-build -E -W -b html . _build/html && cd ..
|
||||||
|
|
|
||||||
|
|
@ -87,8 +87,8 @@ sgp30.set_iaq_baseline(0x8973, 0x8aae)
|
||||||
|
|
||||||
# Sample VEML6070
|
# Sample VEML6070
|
||||||
def sample_VEML():
|
def sample_VEML():
|
||||||
for j in range(10):
|
for _ in range(10):
|
||||||
uv_raw = uv.read
|
uv_raw = uv.uv_raw
|
||||||
return uv_raw
|
return uv_raw
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue