Skip to content

Commit 93f7900

Browse files
committed
Revert "CI caching. (#1796)"
This reverts commit e275017.
1 parent 4ddb9b1 commit 93f7900

File tree

1 file changed

+53
-16
lines changed

1 file changed

+53
-16
lines changed

.github/workflows/ci.yml

Lines changed: 53 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ on:
1818

1919
jobs:
2020
linters:
21-
name: Linters - ${{ matrix.os.on }} - ${{ matrix.python.version }}
22-
runs-on: ${{ matrix.os.on }}
21+
name: Linters
22+
runs-on: ubuntu-latest
2323
timeout-minutes: 10
2424
strategy:
2525
fail-fast: false
@@ -35,17 +35,39 @@ jobs:
3535
- version: '3.11'
3636
- version: '3.12'
3737
steps:
38-
- uses: actions/checkout@v3
39-
- uses: actions/setup-python@v4
38+
- name: Checkout repository
39+
uses: actions/checkout@v3
40+
41+
- name: Set up python
42+
uses: actions/setup-python@v4
4043
with:
4144
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
45+
46+
- name: venv restore
47+
id: cache-venv
48+
uses: syphar/restore-virtualenv@v1
49+
with:
50+
requirement_files: pyproject.toml
51+
52+
- name: venv create
53+
if: steps.cache-venv.outputs.cache-hit != 'true'
54+
run: pip install -e
55+
56+
- name: codespell
57+
run: codespell
58+
59+
- name: pylint
60+
run: pylint --recursive=y examples pymodbus test
61+
62+
- name: precommit (black, bandit, and ruff)
63+
run: pre-commit run --all-files
64+
65+
- name: docs
66+
run: cd doc; ./build_html
67+
68+
- name: mypy
69+
run: mypy pymodbus
70+
4971

5072
integreation_test:
5173
name: pytest - ${{ matrix.os.on }} - ${{ matrix.python.version }}
@@ -65,25 +87,40 @@ jobs:
6587
- version: '3.11'
6688
- version: '3.12'
6789
steps:
68-
- uses: actions/checkout@v3
69-
- uses: actions/setup-python@v4
90+
- name: Checkout repository
91+
uses: actions/checkout@v3
92+
93+
- name: Set up ${{ matrix.python.version }}
94+
uses: actions/setup-python@v4
7095
with:
7196
python-version: ${{ matrix.python.version }}
72-
cache: 'pip'
73-
- run: pip install -e ".[all]"
7497

75-
- run: pytest -n0 -v --full-trace --timeout=1200
98+
- name: venv restore
99+
id: cache-venv
100+
uses: syphar/restore-virtualenv@v1
101+
with:
102+
requirement_files: requirements.txt
103+
104+
- name: venv create
105+
if: steps.cache-venv.outputs.cache-hit != 'true'
106+
run: pip install -e .
107+
108+
- name: pytest
109+
run: pytest -n0 -v --full-trace --timeout=1200
76110

77111
analyze:
78112
name: Analyze Python
79113
runs-on: ubuntu-22.04
80114

81115
steps:
82116
- uses: actions/checkout@v3
117+
83118
- uses: github/codeql-action/init@v2
84119
with:
85120
languages: python
121+
86122
- uses: github/codeql-action/autobuild@v2
123+
87124
- uses: github/codeql-action/analyze@v2
88125

89126
ci_complete:

0 commit comments

Comments
 (0)