forked from webdjoe/pyvesync
-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (55 loc) · 1.35 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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'