Skip to content

Commit 065f80d

Browse files
committed
CI: fix windows tests
1 parent 7ff3c10 commit 065f80d

File tree

1 file changed

+18
-47
lines changed

1 file changed

+18
-47
lines changed

.github/workflows/tests.yml

Lines changed: 18 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@ name: Test
22

33
on:
44
push:
5-
branches: [main,tests-build,v*]
5+
branches: [main, tests-build, v*]
66
pull_request:
7-
branches: [main,v*]
7+
branches: [main, v*]
88

99
concurrency:
1010
group: ${{ github.ref }}
1111
cancel-in-progress: true
1212

13-
1413
jobs:
1514
test:
1615
name: ${{ matrix.os }} - ${{ matrix.python-version }}
@@ -19,7 +18,7 @@ jobs:
1918
fail-fast: false
2019
matrix:
2120
os: [ubuntu-latest, macos-latest]
22-
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
21+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
2322
steps:
2423
- uses: actions/checkout@v3
2524
- name: Set up Python ${{ matrix.python-version }}
@@ -65,78 +64,50 @@ jobs:
6564
path: .pytest_temp/
6665

6766
msvc:
68-
name: ${{matrix.os}} - ${{matrix.python-version}}
67+
name: ${{matrix.os}} - ${{matrix.python-version}} - ${{matrix.architecture}}
6968
runs-on: ${{matrix.os}}
7069
strategy:
7170
fail-fast: false
7271
matrix:
7372
os: [windows-2022]
74-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
73+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
74+
architecture: ["x64", "x86"]
7575
steps:
7676
- uses: actions/checkout@v3
77-
- name: Set up Python ${{ matrix.python-version }} for x64
77+
- name: Set up Python ${{ matrix.python-version }} for ${{matrix.architecture}}
7878
uses: actions/setup-python@v4
7979
with:
8080
python-version: ${{ matrix.python-version }}
81-
architecture: "x64"
81+
architecture: ${{matrix.architecture}}
8282
allow-prereleases: true
8383
- name: Cache Windows
8484
id: cache-windows
8585
uses: actions/cache@v3
8686
with:
8787
path: C:\cibw\pkg-config
88-
key: ${{ hashFiles('packing/download_dlls.py') }}-${{ hashFiles('packing/build_pkgconfig.ps1') }}-1
88+
key: ${{ hashFiles('packing/download_dlls.py') }}-${{ hashFiles('packing/build_pkgconfig.ps1') }}
8989
- name: Download Binary
9090
run: |
9191
python packing/download_dlls.py
92-
- name: Set Path
92+
- name: Set Path for pkg-config
9393
run: |
9494
$env:Path = "C:\cibw\pkg-config\bin;C:\cibw\vendor\bin;$($env:PATH)"
9595
echo "$env:Path" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
96-
- name: Test x64
96+
- name: Install Python Dependencies
9797
run: |
9898
python -m pip install -U pip
9999
pip install -U setuptools wheel
100-
$env:PKG_CONFIG_PATH="C:\cibw\vendor\lib\pkgconfig"
101-
pip install -r requirements-dev.txt
102-
python setup.py build_ext -i
103-
pytest
104-
- name: Coverage
105-
run: |
106-
coverage report
107-
coverage html
108-
coverage xml
109-
- name: Set up Python ${{ matrix.python-version }} for x86
110-
uses: actions/setup-python@v4
111-
with:
112-
python-version: ${{ matrix.python-version }}
113-
architecture: "x86"
114-
allow-prereleases: true
115-
- name: Download Binary
116-
run: |
117-
python packing/download_dlls.py
118-
- name: Build x86 Build
119-
run: |
120-
python -m pip install -U pip
121-
$env:PATH="$env:PATH;C:\cibw\vendor\pkg-config\bin;C:\cibw\vendor\bin"
122-
$env:PKG_CONFIG_PATH="C:\cibw\vendor\lib\pkgconfig"
123100
pip install -r requirements-dev.txt
124-
python setup.py build_ext -i
125-
python setup.py sdist
126-
python -m pip install dist/*
127-
$env:PATH="C:\cibw\vendor\bin;$env:PATH"
128-
pytest
129-
- name: Coverage
101+
- name: Build Project
102+
env:
103+
PKG_CONFIG_PATH: C:\cibw\vendor\lib\pkgconfig
104+
run: python setup.py build_ext -i
105+
- name: Run tests
130106
run: |
131-
coverage report
132-
coverage html
133-
coverage xml
134-
- uses: codecov/codecov-action@v3
135-
with:
136-
file: ./.coverage/coverage.xml
107+
pytest -s
137108
- uses: actions/upload-artifact@v3
138109
with:
139-
name: test-artifacts-${{matrix.os}}-${{matrix.python-version}}
110+
name: test-artifacts-${{matrix.os}}-${{matrix.python-version}} ${{matrix.architecture}}
140111
path: .pytest_temp/
141112
success-win:
142113
needs: [msvc]

0 commit comments

Comments
 (0)