@@ -200,26 +200,81 @@ jobs:
200200 source venv/bin/activate
201201 venv/bin/pytest tests/test_unit_tests.py -v
202202
203- # build-windows-wheel:
204- # name: Build Windows wheel
205- # uses: ./.github/workflows/build-wheel.yml
206- # needs: tests-windows
207- # with:
208- # python-version: "3.10"
209- # architecture: ${{ matrix.target }}
210- # artifact-name: wheels-${{ matrix.target }}
211- # runs-on: windows-latest
212- # secrets:
213- # github-token: ${{ secrets.GITHUB_TOKEN }}
214- # strategy:
215- # matrix:
216- # target: [x64, x86]
217- # if: |
218- # github.event_name != 'pull_request' ||
219- # github.event.pull_request.author_association == 'COLLABORATOR' ||
220- # github.event.pull_request.author_association == 'MEMBER' ||
221- # github.event.pull_request.user.login == 'dependabot[bot]' ||
222- # contains(github.event.pull_request.labels.*.name, 'safe to test')
203+ build-windows-wheel :
204+ name : Build Windows wheel
205+ uses : ./.github/workflows/build-wheel.yml
206+ needs : tests-windows
207+ with :
208+ python-version : " 3.10"
209+ architecture : ${{ matrix.target }}
210+ artifact-name : wheels-${{ matrix.target }}
211+ runs-on : windows-latest
212+ secrets :
213+ github-token : ${{ secrets.GITHUB_TOKEN }}
214+ strategy :
215+ matrix :
216+ target : [x64, x86]
217+ if : |
218+ github.event_name != 'pull_request' ||
219+ github.event.pull_request.author_association == 'COLLABORATOR' ||
220+ github.event.pull_request.author_association == 'MEMBER' ||
221+ github.event.pull_request.user.login == 'dependabot[bot]' ||
222+ contains(github.event.pull_request.labels.*.name, 'safe to test')
223+
224+ test-built-windows-wheel :
225+ name : Test Windows wheel
226+ needs : build-windows-wheel
227+ runs-on : windows-latest
228+ strategy :
229+ matrix :
230+ target : [x64, x86]
231+ if : |
232+ github.event_name != 'pull_request' ||
233+ github.event.pull_request.author_association == 'COLLABORATOR' ||
234+ github.event.pull_request.author_association == 'MEMBER' ||
235+ github.event.pull_request.user.login == 'dependabot[bot]' ||
236+ contains(github.event.pull_request.labels.*.name, 'safe to test')
237+
238+ steps :
239+ - name : Checkout repository
240+ uses : actions/checkout@v4
241+
242+ - name : Set up Python
243+ uses : actions/setup-python@v5
244+ with :
245+ python-version : " 3.10"
246+ cache : " pip"
247+
248+ - name : Download wheel artifacts
249+ uses : actions/download-artifact@v4
250+ with :
251+ name : wheels-${{ matrix.target }}
252+ path : dist
253+
254+ - name : Create and activate virtual environment
255+ run : |
256+ python -m venv venv
257+ .\venv\Scripts\activate
258+
259+ - name : Install wheel for testing
260+ run : |
261+ .\venv\Scripts\activate
262+ pip install dist\c2pa_python-*.whl
263+
264+ - name : Run unittest tests on installed wheel
265+ run : |
266+ .\venv\Scripts\activate
267+ python .\tests\test_unit_tests.py
268+
269+ - name : Install pytest (in venv)
270+ run : |
271+ .\venv\Scripts\activate
272+ pip install pytest
273+
274+ - name : Run tests with pytest (venv)
275+ run : |
276+ .\venv\Scripts\activate
277+ .\venv\Scripts\pytest .\tests\test_unit_tests.py -v
223278
224279 build-macos_x86-wheel :
225280 name : Build macOS x86_64 wheel
0 commit comments