Fix test failing due to timezone #50
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
name: Build-CI | |
on: [pull_request, push] | |
jobs: | |
approve: # First step | |
runs-on: ubuntu-latest | |
steps: | |
- name: Approve | |
run: echo For security reasons, all pull requests to this repository need to be approved first before running any automated CI. | |
build: | |
runs-on: ubuntu-latest | |
needs: [approve] # Require the first step to finish | |
environment: | |
name: IO | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.x | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Update setuptools | |
run: | | |
python -m pip install --upgrade setuptools | |
- name: Install library | |
run: pip install . | |
- name: Install sphinx | |
run: pip3 install pylint Sphinx sphinx-rtd-theme | |
- 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 | |
cd .. | |
- name: Generate documentation | |
run: | | |
cd docs && sphinx-build -E -W -b html . _build/html && cd .. |