-
Notifications
You must be signed in to change notification settings - Fork 951
107 lines (100 loc) · 2.6 KB
/
ci.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: CI
on:
push:
branches:
- dev
- master
tags:
- v*
pull_request:
branches:
- dev
schedule:
# Sunday at 02:10 UTC.
- cron: '10 2 * * 0'
workflow_dispatch:
jobs:
integreation_test:
name: ${{ matrix.task.name }} - ${{ matrix.os.on }} - ${{ matrix.python.version }}
runs-on: ${{ matrix.os.on }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
task:
- name: pylint
cmd: pylint --recursive=y examples pymodbus test
type: lint
- name: codespell
cmd: codespell
type: lint
- name: bandit
cmd: bandit -r -c bandit.yaml .
type: lint
- name: precommit (isort, black, and ruff)
cmd: pre-commit run --all-files
type: lint
- name: docs
cmd: make -C doc/ html
type: lint
- name: mypy
cmd: mypy pymodbus
type: lint
- name: pytest
cmd: pytest --cov=pymodbus --cov=test --cov-report=term-missing --cov-report=xml -v --full-trace --timeout=20
type: test
os:
- name: Linux
on: ubuntu-latest
lint: 'yes'
- name: Macos
on: macos-latest
lint: 'no'
- name: Windows
on: windows-latest
lint: 'no'
python:
- version: '3.8'
lint: 'yes'
- version: '3.9'
lint: 'no'
- version: '3.10'
lint: 'no'
- version: '3.11'
lint: 'no'
- version: pypy-3.8
lint: 'no'
exclude:
- task:
type: lint
os:
lint: 'no'
- task:
type: lint
python:
lint: 'no'
- os:
name: Macos
python:
version: pypy-3.8
- os:
name: Windows
python:
version: pypy-3.8
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up ${{ matrix.python.version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python.version }}
- name: venv restore
id: cache-venv
uses: syphar/restore-virtualenv@v1
with:
requirement_files: requirements.txt
- name: venv create
if: steps.cache-venv.outputs.cache-hit != 'true'
run: pip install -e . -r requirements.txt
- name: test/lint
run: ${{ matrix.task.cmd }}