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
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
|
|
@ -8,26 +8,32 @@ jobs:
|
|||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python 3.6
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.6
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||
|
||||
- name: Install library
|
||||
run: python3 setup.py install
|
||||
|
||||
- name: Install sphinx
|
||||
run: pip3 install pylint Sphinx sphinx-rtd-theme
|
||||
- name: Run all unittests
|
||||
|
||||
- name: Run unittests
|
||||
env:
|
||||
SECRET_IO_KEY: ${{ secrets.CI_IO_KEY }}
|
||||
SECRET_IO_USER: ${{ secrets.CI_IO_USERNAME }}
|
||||
run: |
|
||||
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 ..
|
||||
|
||||
- name: Generate documentation
|
||||
run: |
|
||||
cd docs && sphinx-build -E -W -b html . _build/html && cd ..
|
||||
|
|
|
|||
|
|
@ -87,8 +87,8 @@ sgp30.set_iaq_baseline(0x8973, 0x8aae)
|
|||
|
||||
# Sample VEML6070
|
||||
def sample_VEML():
|
||||
for j in range(10):
|
||||
uv_raw = uv.read
|
||||
for _ in range(10):
|
||||
uv_raw = uv.uv_raw
|
||||
return uv_raw
|
||||
|
||||
while True:
|
||||
|
|
|
|||
Loading…
Reference in a new issue