Compare commits
3 commits
master
...
show-test-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
607c618953 | ||
|
|
071f869b8b | ||
|
|
5ebeafadf2 |
1 changed files with 60 additions and 46 deletions
106
.github/workflows/build.yml
vendored
106
.github/workflows/build.yml
vendored
|
|
@ -1,46 +1,60 @@
|
|||
name: Build-CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: IO
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- 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 unittests
|
||||
env:
|
||||
SECRET_IO_KEY: ${{ secrets.CI_IO_KEY }}
|
||||
SECRET_IO_USER: ${{ secrets.CI_IO_USERNAME }}
|
||||
run: |
|
||||
echo "Secret key length: ${#SECRET_IO_KEY}"
|
||||
echo "Secret username length: ${#SECRET_IO_USER}"
|
||||
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 ..
|
||||
name: Build-CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: IO
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- 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: Log last six characters of username
|
||||
run: |
|
||||
echo "Last six characters of username: ${MY_SECRET: -6}"
|
||||
env:
|
||||
MY_SECRET: ${{ secrets.CI_IO_USERNAME }}
|
||||
|
||||
- name: print username and key
|
||||
run: |
|
||||
echo "username: ${{ secrets.CI_IO_USERNAME }}"
|
||||
|
||||
- name: Run unittests
|
||||
env:
|
||||
SECRET_IO_KEY: ${{ secrets.CI_IO_KEY }}
|
||||
SECRET_IO_USER: ${{ secrets.CI_IO_USERNAME }}
|
||||
run: |
|
||||
echo "Secret key length: ${#SECRET_IO_KEY}"
|
||||
echo "Secret username length: ${#SECRET_IO_USER}"
|
||||
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 ..
|
||||
|
|
|
|||
Loading…
Reference in a new issue