Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit dd7d7e3

Browse files
committedDec 7, 2023
Merge branch 'dev'
2 parents 5d2a2b6 + 71e78ff commit dd7d7e3

File tree

131 files changed

+2306
-1893
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+2306
-1893
lines changed
 

‎.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ Before opening a new issue, make sure you do the following:
3030
# please use the following to format logs when posting them here
3131
import pymodbus
3232

33-
pymodbus.pymodbus_apply_logging_config()
33+
pymodbus.pymodbus_apply_logging_config("DEBUG")
3434
```

‎.github/workflows/ci.yml

Lines changed: 88 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: CI
2-
32
on:
43
push:
54
branches:
65
- dev
76
- master
7+
- dev_*
88
tags:
99
- v*
1010
pull_request:
@@ -15,83 +15,117 @@ on:
1515
- cron: '10 2 * * 0'
1616
workflow_dispatch:
1717

18-
1918
jobs:
20-
linters:
21-
name: Linters - ${{ matrix.os.on }} - ${{ matrix.python.version }}
22-
runs-on: ${{ matrix.os.on }}
23-
timeout-minutes: 10
24-
strategy:
25-
fail-fast: false
26-
matrix:
27-
os:
28-
- on: ubuntu-latest
29-
# - on: macos-latest
30-
# - on: windows-latest
31-
python:
32-
- version: '3.8'
33-
- version: '3.9'
34-
- version: '3.10'
35-
- version: '3.11'
36-
steps:
37-
- uses: actions/checkout@v3
38-
- uses: actions/setup-python@v4
39-
with:
40-
python-version: ${{ matrix.python.version }}
41-
cache: 'pip'
42-
- run: pip install -e ".[all]"
43-
- run: codespell
44-
- run: pylint --recursive=y examples pymodbus test
45-
- run: pre-commit run --all-files
46-
- run: cd doc; ./build_html
47-
- run: mypy pymodbus
48-
49-
integreation_test:
50-
name: pytest - ${{ matrix.os.on }} - ${{ matrix.python.version }}
51-
runs-on: ${{ matrix.os.on }}
19+
testing:
20+
name: ${{ matrix.os }} - ${{ matrix.python }}
21+
runs-on: ${{ matrix.os }}
5222
timeout-minutes: 20
5323
strategy:
5424
fail-fast: false
5525
matrix:
56-
os:
57-
- on: ubuntu-latest
58-
- on: macos-latest
59-
- on: windows-latest
60-
python:
61-
- version: '3.8'
62-
- version: '3.9'
63-
- version: '3.10'
64-
- version: '3.11'
26+
os: [ubuntu-latest, macos-latest, windows-latest]
27+
python: ['3.8', '3.9', '3.10', '3.11', '3.12']
28+
include:
29+
- python: '3.8'
30+
run_lint: true
31+
- python: '3.12'
32+
run_doc: true
33+
run_lint: true
34+
- os: macos-latest
35+
run_doc: false
36+
run_lint: false
37+
- os: windows-latest
38+
run_doc: false
39+
run_lint: false
40+
6541
steps:
66-
- uses: actions/checkout@v3
67-
- uses: actions/setup-python@v4
42+
- name: Checkout repo from github
43+
uses: actions/checkout@v4.1.0
44+
45+
- name: Set up Python ${{ matrix.python }}
46+
uses: actions/setup-python@v4.7.1
6847
with:
69-
python-version: ${{ matrix.python.version }}
70-
cache: 'pip'
71-
- run: pip install -e ".[all]"
48+
python-version: ${{ matrix.python }}
49+
50+
- name: Set venv path (NON Windows)
51+
if: matrix.os != 'windows-latest'
52+
run: |
53+
echo "VIRTUAL_ENV=${{ github.workspace }}/venv" >> $GITHUB_ENV
54+
echo ${{ github.workspace }}/venv/bin >> $GITHUB_PATH
7255
73-
- run: pytest -n0 -v --full-trace --timeout=1200
56+
- name: Set venv path (Windows)
57+
if: matrix.os == 'windows-latest'
58+
run: |
59+
echo "VIRTUAL_ENV=${{ github.workspace }}\\venv" >> $Env:GITHUB_ENV
60+
echo "${{ github.workspace }}\\venv\\Scripts" >> $Env:GITHUB_PATH
61+
62+
- name: Restore base Python virtual environment
63+
id: cache-venv
64+
uses: actions/cache@v3.3.2
65+
with:
66+
path: ${{ env.VIRTUAL_ENV }}
67+
key: >-
68+
${{ runner.os }}-${{ matrix.python }}-venv-${{
69+
hashFiles('pyproject.toml') }}
70+
71+
- name: Create venv (NEW CACHE)
72+
if: steps.cache-venv.outputs.cache-hit != 'true'
73+
run: |
74+
python -m venv ${{ env.VIRTUAL_ENV }}
75+
python -m pip install --upgrade pip
76+
pip install -e ".[all]"
77+
78+
- name: codespell
79+
if: matrix.run_doc == true
80+
run: |
81+
codespell
82+
83+
- name: dcoumentation
84+
if: matrix.run_doc == true
85+
run: |
86+
cd doc; ./build_html
87+
88+
- name: pylint
89+
if: matrix.run_lint == true
90+
run: |
91+
pylint --recursive=y examples pymodbus test
92+
93+
- name: mypy
94+
if: matrix.run_lint == true
95+
run: |
96+
mypy pymodbus
97+
98+
- name: ruff
99+
if: matrix.run_lint == true
100+
run: |
101+
ruff .
102+
103+
- name: pytest
104+
run: |
105+
env
106+
pytest -v --full-trace --timeout=1200
74107
75108
analyze:
76109
name: Analyze Python
77110
runs-on: ubuntu-22.04
78-
111+
timeout-minutes: 10
79112
steps:
80113
- uses: actions/checkout@v3
114+
81115
- uses: github/codeql-action/init@v2
82116
with:
83117
languages: python
118+
84119
- uses: github/codeql-action/autobuild@v2
120+
85121
- uses: github/codeql-action/analyze@v2
86122

87123
ci_complete:
88124
name: ci_complete
89125
runs-on: ubuntu-latest
90126
needs:
91-
- linters
92127
- analyze
93-
- integreation_test
128+
- testing
94129
timeout-minutes: 1
95130
steps:
96-
- name: Dummy
97-
run: ls
131+
- run: echo 'finish job'

0 commit comments

Comments
 (0)
Please sign in to comment.