Skip to content

Commit

Permalink
test(ci): Add github action for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierBerger committed Sep 1, 2023
1 parent bcbc18a commit f45b83c
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
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
29 changes: 29 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[FORMAT]
# Maximum number of characters on a single line.
max-line-length=120

[MESSAGES CONTROL]

# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifiers separated by comma (,) or put this
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once). You can also use "--disable=all" to
# disable everything first and then re-enable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
disable=C0114,
C0115,
C0116,
C0302,
C0411,
E0401,
E0611,
R0913,
W0105,
W0201,
W0613,
W0718,
W1514

0 comments on commit f45b83c

Please sign in to comment.