From 28b39a4d37c69af410b2556815f363f95690f8ff Mon Sep 17 00:00:00 2001 From: Joachim Metz Date: Sat, 4 Jul 2026 10:10:57 +0200 Subject: [PATCH] Changes for CI tests --- .github/workflows/test_windows.yml | 29 +++++++++++++++++++++++++++++ appveyor.yml | 28 ---------------------------- config/appveyor/install.ps1 | 27 --------------------------- pyproject.toml | 2 +- tox.ini | 3 +-- 5 files changed, 31 insertions(+), 58 deletions(-) create mode 100644 .github/workflows/test_windows.yml delete mode 100644 appveyor.yml delete mode 100644 config/appveyor/install.ps1 diff --git a/.github/workflows/test_windows.yml b/.github/workflows/test_windows.yml new file mode 100644 index 00000000..04331fb5 --- /dev/null +++ b/.github/workflows/test_windows.yml @@ -0,0 +1,29 @@ +# Run tests on Windows. +name: test_windows +on: [push, pull_request] +permissions: read-all +jobs: + test_windows: + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: windows-2025 + python-version: '3.14' + toxenv: 'py314' + steps: + - name: Configure git + run: git config --global core.autocrlf false + - uses: actions/checkout@v6 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + - name: Install tox + run: | + python -m pip install --upgrade pip + python -m pip install tox tox-gh-actions + - name: Run tests + run: | + tox -e ${{ matrix.toxenv }} diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 07a70c00..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,28 +0,0 @@ -environment: - matrix: - - DESCRIPTION: "Run tests on Windows with 32-bit Python 3.14" - MACHINE_TYPE: "x86" - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 - PYTHON: "C:\\Python314" - PYTHON_VERSION: "3.14" - L2TBINARIES_TRACK: "dev" - TARGET: tests - - DESCRIPTION: "Run tests on Windows with 64-bit Python 3.14" - MACHINE_TYPE: "amd64" - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 - PYTHON: "C:\\Python314-x64" - PYTHON_VERSION: "3.14" - L2TBINARIES_TRACK: "dev" - TARGET: tests - -install: -- cmd: "%PYTHON%\\python.exe -m pip install -U build pip setuptools wheel" - -build: off - -test_script: -- cmd: IF [%TARGET%]==[tests] ( - "%PYTHON%\\python.exe" run_tests.py && - IF EXIST "tests\\end-to-end.py" ( - set PYTHONPATH=. && - "%PYTHON%\\python.exe" "tests\\end-to-end.py" --debug -c "config\\end-to-end.ini" ) ) diff --git a/config/appveyor/install.ps1 b/config/appveyor/install.ps1 deleted file mode 100644 index 95eecae8..00000000 --- a/config/appveyor/install.ps1 +++ /dev/null @@ -1,27 +0,0 @@ -# Script to set up tests on AppVeyor Windows. - -$Dependencies = "" - -If ($Dependencies.Length -gt 0) -{ - $Dependencies = ${Dependencies} -split " " - - $Output = Invoke-Expression -Command "git clone https://github.com/log2timeline/l2tdevtools.git ..\l2tdevtools 2>&1" | %{ "$_" } - Write-Host (${Output} | Out-String) - - If ($env:APPVEYOR_REPO_BRANCH -eq "main") - { - $Track = "stable" - } - Else - { - $Track = $env:APPVEYOR_REPO_BRANCH - } - New-Item -ItemType "directory" -Name "dependencies" - - $env:PYTHONPATH = "..\l2tdevtools" - - $Output = Invoke-Expression -Command "& '${env:PYTHON}\python.exe' ..\l2tdevtools\tools\update.py --download-directory dependencies --machine-type ${env:MACHINE_TYPE} --track ${env:L2TBINARIES_TRACK} ${Dependencies} 2>&1" | %{ "$_" } - Write-Host (${Output} | Out-String) -} - diff --git a/pyproject.toml b/pyproject.toml index 3ba7d41b..c23fa57a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "l2tdevtools" -version = "20260527" +version = "20260704" description = "Development tools for the log2timeline projects" maintainers = [ { name = "Log2Timeline maintainers", email = "log2timeline-maintainers@googlegroups.com" }, diff --git a/tox.ini b/tox.ini index 4cd75a32..38a0d40e 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,6 @@ envlist = py3{10,11,12,13,14},black,coverage,docformatter,pylint,wheel [testenv] -allowlist_externals = ./run_tests.py pip_pre = True passenv = CFLAGS @@ -17,7 +16,7 @@ deps = setuptools >= 65 wheel commands = - py3{10,11,12,13,14}: ./run_tests.py + py3{10,11,12,13,14}: python run_tests.py coverage: coverage erase coverage: coverage run --source=l2tdevtools --omit="*_test*,*__init__*,*test_lib*" run_tests.py coverage: coverage xml