doc(coverage): publish coverage as gh-pages #26
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: Continuous Integration | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r appdaemon/test/requirements.txt | |
- name: Lint code with pylint | |
run: | | |
pylint $(git ls-files '*.py' | grep -v notifier.py | grep -v hass_driver.py) | |
- name: Run coverage analysis | |
continue-on-error: true | |
run: | | |
cd appdaemon | |
coverage run --source apps -m pytest test | |
coverage report -m | |
coverage html | |
coverage-badge -o htmlcov/coverage.svg | |
pwd | |
ls htmlcov/ | |
- name: Test with pytest | |
run: | | |
cd appdaemon/test | |
pytest -v | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: appdaemon/htmlcov | |