Skip to content

Commit 49616c8

Browse files
committed
Used tooled python and OS.
1 parent 8b38047 commit 49616c8

File tree

1 file changed

+30
-72
lines changed

1 file changed

+30
-72
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ on:
2626

2727
jobs:
2828
integreation_test:
29-
name: ${{ matrix.task.name }} - ${{ matrix.os.name }} ${{ matrix.python.name }}
30-
runs-on: ${{ matrix.os.runs-on }}
31-
container: ${{ matrix.os.container[matrix.python.docker] }}
29+
name: ${{ matrix.task.name }} - ${{ matrix.os.on }} - ${{ matrix.python.version }}
30+
runs-on: ${{ matrix.os.on }}
3231
timeout-minutes: 10
3332
strategy:
3433
fail-fast: false
@@ -59,110 +58,69 @@ jobs:
5958
type: test
6059
cmd: pytest --cov=pymodbus --cov=test --cov-report=term-missing --cov-report=xml -v --full-trace --timeout=20
6160
os:
62-
- name: Linux
63-
runs-on: ubuntu-latest
61+
- on: ubuntu-latest
6462
activate: '. venv/bin/activate'
65-
container:
66-
3.8: docker://python:3.8-buster
67-
3.9: docker://python:3.9-buster
68-
3.10: docker://python:3.10-buster
69-
pypy3: docker://pypy:3-stretch
70-
- name: macOS
71-
runs-on: macos-latest
63+
- on: macos-latest
7264
activate: '. venv/bin/activate'
73-
- name: Windows
74-
runs-on: windows-latest
65+
no-lint: 'yes'
66+
- on: windows-latest
7567
activate: 'venv/Scripts/activate'
76-
ports: 5020-5099
68+
no-lint: 'yes'
7769
python:
78-
- name: CPython 3.8
79-
action: 3.8
80-
docker: 3.8
81-
matrix: 3.8
82-
implementation: cpython
83-
- name: CPython 3.9
84-
action: 3.9
85-
docker: 3.9
86-
matrix: 3.9
87-
implementation: cpython
88-
- name: 'CPython 3.10'
89-
action: '3.10'
90-
docker: '3.10'
91-
matrix: '3.10'
92-
implementation: cpython
93-
- name: PyPy 3.8
94-
action: pypy-3.8
95-
docker: pypy3.8
96-
matrix: 3.8
70+
- version: '3.8'
71+
no-lint: 'no'
72+
- version: '3.9'
73+
no-lint: 'yes'
74+
- version: '3.10'
75+
no-lint: 'yes'
76+
- version: pypy-3.8
9777
implementation: pypy
98-
- name: PyPy 3.9
99-
action: pypy-3.9
100-
docker: pypy3.9
101-
matrix: 3.9
78+
no-lint: 'yes'
79+
- version: pypy-3.9
10280
implementation: pypy
81+
no-lint: 'yes'
10382
exclude:
10483
- task:
10584
type: lint
10685
os:
107-
name: macOS
108-
- task:
109-
type: lint
110-
os:
111-
name: Windows
86+
no-lint: 'yes'
11287
- task:
11388
type: lint
11489
python:
115-
matrix: 3.9
116-
- task:
117-
type: lint
118-
python:
119-
matrix: '3.10'
120-
- task:
121-
type: lint
90+
no-lint: 'yes'
91+
- os:
92+
on: macos-latest
12293
python:
12394
implementation: pypy
124-
- python:
125-
implementation: pypy
126-
os:
127-
name: macOS
128-
- python:
95+
- os:
96+
on: windows-latest
97+
python:
12998
implementation: pypy
130-
os:
131-
name: Windows
13299
steps:
133100
- name: Checkout repository
134101
uses: actions/checkout@v3
135102

136-
- name: Set up ${{ matrix.python.name }} (if CPython)
137-
if: ${{ job.container == '' && matrix.python.implementation == 'cpython' }}
138-
uses: actions/setup-python@v3
139-
with:
140-
python-version: '${{ matrix.python.action }}.0-alpha - ${{ matrix.python.action }}.X'
141-
check-latest: true
142-
143-
- name: Set up ${{ matrix.python.name }} (if PyPy)
144-
if: ${{ job.container == '' && matrix.python.implementation == 'pypy' }}
145-
uses: actions/setup-python@v3
103+
- name: Set up ${{ matrix.python.version }}
104+
uses: actions/setup-python@v4
146105
with:
147-
python-version: '${{ matrix.python.action }}'
148-
check-latest: true
106+
python-version: ${{ matrix.python.version }}
149107

150108
- name: venv restore
151109
id: cache-venv
152110
uses: actions/cache@v3
153111
with:
154112
path: venv
155-
key: "venv_${{ matrix.os.name }}_${{ matrix.python.name }}_${{ hashFiles('requirements.txt') }}"
113+
key: "venv_${{ matrix.os.on }}_${{ matrix.python.version }}_${{ hashFiles('requirements.txt') }}"
156114

157115
- name: venv create
158116
if: ${{ steps.cache-venv.outputs.cache-hit != 'true' }}
159117
run: |
160118
python -m venv venv
161119
${{ matrix.os.activate }}
162-
pip install -r requirements.txt
163-
pip install -e .
120+
pip install -e . -r requirements.txt
164121
165122
- name: test
123+
if: ${{ matrix.task.type == 'test' && inputs.run_test }}
166124
run: |
167125
${{ matrix.os.activate }}
168126
${{ matrix.task.cmd }}

0 commit comments

Comments
 (0)