|
26 | 26 |
|
27 | 27 | jobs: |
28 | 28 | 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 }} |
32 | 31 | timeout-minutes: 10 |
33 | 32 | strategy: |
34 | 33 | fail-fast: false |
@@ -59,110 +58,69 @@ jobs: |
59 | 58 | type: test |
60 | 59 | cmd: pytest --cov=pymodbus --cov=test --cov-report=term-missing --cov-report=xml -v --full-trace --timeout=20 |
61 | 60 | os: |
62 | | - - name: Linux |
63 | | - runs-on: ubuntu-latest |
| 61 | + - on: ubuntu-latest |
64 | 62 | 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 |
72 | 64 | activate: '. venv/bin/activate' |
73 | | - - name: Windows |
74 | | - runs-on: windows-latest |
| 65 | + no-lint: 'yes' |
| 66 | + - on: windows-latest |
75 | 67 | activate: 'venv/Scripts/activate' |
76 | | - ports: 5020-5099 |
| 68 | + no-lint: 'yes' |
77 | 69 | 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 |
97 | 77 | 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 |
102 | 80 | implementation: pypy |
| 81 | + no-lint: 'yes' |
103 | 82 | exclude: |
104 | 83 | - task: |
105 | 84 | type: lint |
106 | 85 | os: |
107 | | - name: macOS |
108 | | - - task: |
109 | | - type: lint |
110 | | - os: |
111 | | - name: Windows |
| 86 | + no-lint: 'yes' |
112 | 87 | - task: |
113 | 88 | type: lint |
114 | 89 | 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 |
122 | 93 | python: |
123 | 94 | implementation: pypy |
124 | | - - python: |
125 | | - implementation: pypy |
126 | | - os: |
127 | | - name: macOS |
128 | | - - python: |
| 95 | + - os: |
| 96 | + on: windows-latest |
| 97 | + python: |
129 | 98 | implementation: pypy |
130 | | - os: |
131 | | - name: Windows |
132 | 99 | steps: |
133 | 100 | - name: Checkout repository |
134 | 101 | uses: actions/checkout@v3 |
135 | 102 |
|
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 |
146 | 105 | with: |
147 | | - python-version: '${{ matrix.python.action }}' |
148 | | - check-latest: true |
| 106 | + python-version: ${{ matrix.python.version }} |
149 | 107 |
|
150 | 108 | - name: venv restore |
151 | 109 | id: cache-venv |
152 | 110 | uses: actions/cache@v3 |
153 | 111 | with: |
154 | 112 | 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') }}" |
156 | 114 |
|
157 | 115 | - name: venv create |
158 | 116 | if: ${{ steps.cache-venv.outputs.cache-hit != 'true' }} |
159 | 117 | run: | |
160 | 118 | python -m venv venv |
161 | 119 | ${{ matrix.os.activate }} |
162 | | - pip install -r requirements.txt |
163 | | - pip install -e . |
| 120 | + pip install -e . -r requirements.txt |
164 | 121 |
|
165 | 122 | - name: test |
| 123 | + if: ${{ matrix.task.type == 'test' && inputs.run_test }} |
166 | 124 | run: | |
167 | 125 | ${{ matrix.os.activate }} |
168 | 126 | ${{ matrix.task.cmd }} |
|
0 commit comments