-
Notifications
You must be signed in to change notification settings - Fork 4
59 lines (49 loc) · 1.66 KB
/
test.yml
File metadata and controls
59 lines (49 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: brew install libiconv
- name: Install dependencies (Windows)
if: runner.os == 'Windows'
run: |
curl -L -o libiconv.zip https://github.com/pffang/libiconv-for-Windows/releases/download/1.18/libiconv-for-Windows_prebuilt.zip
Expand-Archive libiconv.zip -DestinationPath libiconv
$ppath = python -c "import sys; print(sys.base_prefix)"
Copy-Item "libiconv\iconv.h" "$ppath\include\"
New-Item -ItemType Directory -Force -Path "$ppath\libs"
Copy-Item "libiconv\x64\Release\libiconv.lib" "$ppath\libs\iconv.lib"
Copy-Item "libiconv\x64\Release\libiconv.dll" "$ppath\Lib\site-packages\"
- name: Install package
run: |
python -m pip install --upgrade pip
pip install -e .
- name: Run tests
if: runner.os != 'Windows'
run: python -m unittest -v
- name: Run tests (Windows)
if: runner.os == 'Windows'
run: |
Copy-Item "libiconv\x64\Release\libiconv.dll" "libiconv.dll"
python -m unittest -v