Skip to content

Tests

Tests #20

Workflow file for this run

name: Tests
on:
workflow_dispatch:
jobs:
Validation:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: 'Use Python 3.9'
uses: actions/setup-python@v4
with:
python-version: '3.9'
- run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
name: 'Install dependencies'
- run: |
pip install flake8 flake8-docstrings
flake8 src/pyvesync
name: 'Flake8'
- run: |
pip install pylint
pylint src/pyvesync
name: 'Pylint'
- run: |
pip install mypy
python3 -m pip install types-requests
mypy src/pyvesync
name: 'MyPy'
pytest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: 'Use Python ${{matrix.python-version}}'
uses: actions/setup-python@v4
with:
python-version: ${{matrix.python-version}}
- run: |
set -e
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-sugar pyyaml
name: 'Install dependencies'
- run: |
pytest --junitxml=reports/pytest.xml
name: 'Run Tests'