Skip to content

Run tests on Windows and MacOS #240

Run tests on Windows and MacOS

Run tests on Windows and MacOS #240

Workflow file for this run

name: Unit tests
on:
push:
branches:
- main
pull_request:
jobs:
# test-ubuntu:
# strategy:
# matrix:
# python:
# - "3.9"
# - "3.10"
# - "3.11"
# - "3.12"
# - "3.13"
#
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
#
# - name: Install the latest version of uv
# uses: astral-sh/setup-uv@v3
# with:
# version: "0.4.18"
# enable-cache: true
# cache-dependency-glob: pyproject.toml
#
# - name: Install Python ${{ matrix.python }}
# run: uv python install ${{ matrix.python }}
#
# - name: Setup rust
# uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8
# with:
# components: rustfmt
# toolchain: 1.81.0
#
# - name: test
# run: make test INSTALL_EXTRA=test
test-windows:
strategy:
matrix:
python:
# - "3.9"
# - "3.10"
# - "3.11"
- "3.12"
# - "3.13"
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.18"
enable-cache: true
cache-dependency-glob: pyproject.toml
- name: Install Python ${{ matrix.python }}
run: uv python install ${{ matrix.python }}
- name: Install OpenSSL
env:
OPENSSL_INSTALLER: "Win64OpenSSL-3_3_2.exe"
OPENSSL_PATH: "C:\\OpenSSL-Win64"
run: |
curl.exe -o "c:\\${env:OPENSSL_INSTALLER}" -fsSL "https://slproweb.com/download/${env:OPENSSL_INSTALLER}"
Start-Process -FilePath "c:\\${env:OPENSSL_INSTALLER}" -ArgumentList "/silent /verysilent /DIR=${env:OPENSSL_PATH}" -NoNewWindow -Wait
# - name: Setup rust
# uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8
# with:
# components: rustfmt
# toolchain: 1.81.0
- name: Setup env variables
shell: bash
run: |
UV_PYTHON_PATH=$(uv python dir)
export INSTALLED_PYTHON="$(find $UV_PYTHON_PATH -type d -maxdepth 1 -name '*${{ matrix.python }}*')"
# echo "$INSTALLED_PYTHON" >> $GITHUB_PATH
echo "PYO3_PYTHON=$INSTALLED_PYTHON\python.exe" >> $GITHUB_ENV
- name: test
run: |
uv venv env-local
. env-local/Scripts/activate
uv pip install dlltracer
uv pip install -e '.[test]'
python main.py
# make test INSTALL_EXTRA=test
shell: bash
env:
OPENSSL_DIR: "C:\\OpenSSL-Win64"
OPENSSL_LIB_DIR: "C:\\OpenSSL-Win64\\lib\\VC\\x64\\MD"
OPENSSL_NO_VENDOR: 1