Skip to content

Commit 1635212

Browse files
committed
Change CI cache steps.
1 parent 32e4881 commit 1635212

File tree

4 files changed

+1284
-62
lines changed

4 files changed

+1284
-62
lines changed

.github/workflows/ci.yml

Lines changed: 65 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: CI
2-
32
on:
43
push:
54
branches:
@@ -17,82 +16,86 @@ on:
1716

1817

1918
jobs:
20-
linters:
21-
name: Linters - ${{ matrix.os.on }} - ${{ matrix.python.version }}
22-
runs-on: ${{ matrix.os.on }}
19+
pymodbus:
20+
name: ${{ matrix.os }} - ${{ matrix.python }}
21+
runs-on: ${{ matrix.os }}
2322
timeout-minutes: 10
2423
strategy:
2524
fail-fast: false
2625
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-
- version: '3.12'
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
3734
steps:
38-
- uses: actions/checkout@v3
39-
- uses: actions/setup-python@v4
35+
- name: Checkout repo from github
36+
uses: actions/[email protected]
37+
- name: Set up Python ${{ matrix.python }}
38+
uses: actions/[email protected]
4039
with:
41-
python-version: ${{ matrix.python.version }}
42-
cache: 'pip'
43-
- run: pip install -e ".[all]"
44-
- run: codespell
45-
- run: pylint --recursive=y examples pymodbus test
46-
- run: pre-commit run --all-files
47-
- run: cd doc; ./build_html
48-
- run: mypy pymodbus
40+
python-version: ${{ matrix.python }}
4941

50-
integreation_test:
51-
name: pytest - ${{ matrix.os.on }} - ${{ matrix.python.version }}
52-
runs-on: ${{ matrix.os.on }}
53-
timeout-minutes: 20
54-
strategy:
55-
fail-fast: false
56-
matrix:
57-
os:
58-
- on: ubuntu-latest
59-
- on: macos-latest
60-
- on: windows-latest
61-
python:
62-
- version: '3.8'
63-
- version: '3.9'
64-
- version: '3.10'
65-
- version: '3.11'
66-
- version: '3.12'
67-
steps:
68-
- uses: actions/checkout@v3
69-
- uses: actions/setup-python@v4
70-
with:
71-
python-version: ${{ matrix.python.version }}
72-
cache: 'pip'
73-
- run: pip install -e ".[all]"
7442

75-
- run: pytest -n0 -v --full-trace --timeout=1200
7643

77-
analyze:
78-
name: Analyze Python
79-
runs-on: ubuntu-22.04
44+
# - run: pip install -e ".[all]"
45+
# - name: Linter codespell
46+
# run: codespell
47+
# - name: Linter pylint
48+
# run: pylint --recursive=y examples pymodbus test
49+
# - name: Linter pre-commit
50+
# run: pre-commit run --all-files
51+
# - name: mypy
52+
# run: mypy pymodbus
53+
# - name: Linter build doc
54+
# run: cd doc; ./build_html
8055

81-
steps:
82-
- uses: actions/checkout@v3
83-
- uses: github/codeql-action/init@v2
84-
with:
85-
languages: python
86-
- uses: github/codeql-action/autobuild@v2
87-
- uses: github/codeql-action/analyze@v2
56+
#integreation_test:
57+
# name: pytest - ${{ matrix.os.on }} - ${{ matrix.python.version }}
58+
# runs-on: ${{ matrix.os.on }}
59+
# timeout-minutes: 20
60+
# strategy:
61+
# fail-fast: false
62+
# matrix:
63+
# os:
64+
# - on: windows-latest
65+
# - on: macos-latest
66+
# - on: ubuntu-latest
67+
# python:
68+
# - version: '3.12'
69+
# - version: '3.11'
70+
# - version: '3.10'
71+
# - version: '3.9'
72+
# - version: '3.8'
73+
# steps:
74+
# - uses: actions/[email protected]
75+
# - uses: actions/setup-python@v4
76+
# with:
77+
# python-version: ${{ matrix.python.version }}
78+
# - run: pip install -e ".[all]"
79+
# - run: pytest -n0 -v --full-trace --timeout=1200
80+
81+
# analyze:
82+
# name: Analyze Python
83+
# runs-on: ubuntu-22.04
84+
# steps:
85+
# - uses: actions/checkout@v3
86+
# - uses: github/codeql-action/init@v2
87+
# with:
88+
# languages: python
89+
# - uses: github/codeql-action/autobuild@v2
90+
# - uses: github/codeql-action/analyze@v2
8891

8992
ci_complete:
9093
name: ci_complete
9194
runs-on: ubuntu-latest
9295
needs:
93-
- linters
94-
- analyze
95-
- integreation_test
96+
# - analyze
97+
- pymodbus
98+
# - integreation_test
9699
timeout-minutes: 1
97100
steps:
98101
- name: Dummy

0 commit comments

Comments
 (0)