Skip to content

Commit

Permalink
Create github actions for automated validation
Browse files Browse the repository at this point in the history
  • Loading branch information
sdrapha committed May 22, 2024
1 parent ccde038 commit 6666daf
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Tests

on:
workflow_dispatch:
push:
pull_request:

jobs:
Validation:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: 'Use Python 3.8'
uses: actions/setup-python@v4
with:
python-version: '3.8'
- 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
mypy src/pyvesync
python3 -m pip install types-requests
name: 'MyPy'
pytest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
steps:
- 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'

0 comments on commit 6666daf

Please sign in to comment.