Skip to content

test(ci): Add github action for tests #6

test(ci): Add github action for tests

test(ci): Add github action for tests #6

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@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r appdaemon/test/requirements.txt
- name: Lint code with pylint
continue-on-error: true
run: |
pylint $(git ls-files '*.py')
- name: Run coverage analysis
continue-on-error: true
run: |
coverage run -m pytest
coverage report
- name: Test with pytest
run: |
cd appdaemon/test
pytest -v