@@ -12,11 +12,12 @@ permissions:
1212
1313jobs :
1414 build :
15- timeout-minutes : 10
15+ timeout-minutes : 5
1616 strategy :
1717 matrix :
1818 os : ["ubuntu-latest", "macos-latest", "windows-latest"]
1919 python-version : ["3.11", "3.12", "3.13"]
20+ polars-version : ["1.20", "1.30", "1.31"]
2021 include :
2122 # Methodology: Use Ubuntu for basically everything, then target
2223 # specific cases for the OSes and Python versions.
2627 python-version : " 3.12"
2728
2829 # Polars version tests (Python 3.12 only).
29- - python-version : " 3.12"
30- polars-version : " 0.20"
3130 - python-version : " 3.12"
3231 polars-version : " 1.20"
3332 - python-version : " 3.12"
5049 - name : Set up Python
5150 run : uv python install
5251
53- - name : Install uv dependencies
52+ - name : Install uv dependencies (Linux/macOS)
5453 if : runner.os == 'Linux' || runner.os == 'macOS'
5554 run : |
5655 if [ -n "${{ matrix.polars-version || '' }}" ]; then
6261 fi
6362 - name : Install uv dependencies (Windows)
6463 if : runner.os == 'Windows'
64+ shell : pwsh
6565 run : |
6666 if ($env:MATRIX_POLARS_VERSION) {
6767 Write-Host "Overriding Polars version to $env:MATRIX_POLARS_VERSION"
@@ -70,14 +70,16 @@ jobs:
7070 } else {
7171 uv sync --all-extras
7272 }
73- shell : pwsh
7473
7574 - name : Run linting
7675 run : |
76+ uv run python -c "import polars ; polars.show_versions()"
7777 uv run ruff format --check .
7878 uv run ruff check .
7979
8080 - name : Run type checking
81+ # Skip type checking on many old Polars versions.
82+ if : matrix.polars-version != '0.20'
8183 run : uv run pyright .
8284
8385 # Linux (Ubuntu)
@@ -102,20 +104,34 @@ jobs:
102104 if : runner.os == 'Windows'
103105 run : |
104106 $url = "https://github.com/lsgunth/mdbtools-win/archive/refs/tags/v1.0.0.zip"
105- $zipPath = "$env:RUNNER_TEMP\mdbtools-win.zip"
106- $extractPath = "$env:GITHUB_WORKSPACE\path"
107+ $zipPath = "$env:RUNNER_TEMP\mdbtools-win-1.0.0.zip"
108+ $extractRoot = "$env:RUNNER_TEMP\mdbtools"
109+ $installPath = "$env:GITHUB_WORKSPACE\mdbtools"
107110
108111 # Download the zip file
109112 Invoke-WebRequest -Uri $url -OutFile $zipPath
110113
111- # Create the target directory if it doesn't exist
112- New-Item -ItemType Directory -Force -Path $extractPath | Out-Null
114+ # Create the extraction root and install directories
115+ New-Item -ItemType Directory -Force -Path $extractRoot | Out-Null
116+ New-Item -ItemType Directory -Force -Path $installPath | Out-Null
113117
114118 # Extract the zip file
115- Expand-Archive -Path $zipPath -DestinationPath $extractPath -Force
119+ Expand-Archive -Path $zipPath -DestinationPath $extractRoot -Force
120+
121+ # Move contents from the subfolder (mdbtools-win-1.0.0) to install path
122+ $innerDir = Join-Path $extractRoot "mdbtools-win-1.0.0"
123+ Copy-Item -Path (Join-Path $innerDir "*") -Destination $installPath -Recurse -Force
116124
117- Write-Host "Extracted to $extractPath"
125+ # Add install path to PATH
126+ Write-Host "Adding $installPath to PATH"
127+ echo "$installPath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
128+
129+ Write-Host "MDBTools installed at $installPath"
118130 shell : pwsh
119131
132+ - name : Verify MDBTools installation
133+ run : |
134+ mdb-ver --version
135+
120136 - name : Run tests
121137 run : uv run pytest tests/
0 commit comments