Update codeql-analysis.yml #155
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: framework_unit_tests | |
on: [push] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: "Set up Python 3.7" | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: "install dependancies" | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 pytest coverage pytest-cov | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: "Unit tests with pytest" | |
run: | | |
python -m pytest -x -v --color=yes tests/ --cov=home_automation_framework --cov-config bin/.coveragerc --cov-report term-missing -p no:warnings | |
- name: "Upload coverage to Codecov" | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
flags: unittests | |
fail_ci_if_error: true |