diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ac73401..e027b55 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 - env: + + - 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 .. diff --git a/examples/basics/environmental_monitor.py b/examples/basics/environmental_monitor.py index 144010d..21be64e 100644 --- a/examples/basics/environmental_monitor.py +++ b/examples/basics/environmental_monitor.py @@ -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: