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