diff --git a/.github/workflows/test_windows.yml b/.github/workflows/test_windows.yml new file mode 100644 index 0000000..c3a0080 --- /dev/null +++ b/.github/workflows/test_windows.yml @@ -0,0 +1,27 @@ +# 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: + - 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 8fd32db..0000000 --- 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: -- ps: .\config\appveyor\install.ps1 - -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 2ef3266..0000000 --- a/config/appveyor/install.ps1 +++ /dev/null @@ -1,27 +0,0 @@ -# Script to set up tests on AppVeyor Windows. - -$Dependencies = "PyYAML dfdatetime dtfabric libcreg libregf" - -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/tox.ini b/tox.ini index c79e60b..d12b761 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,6 @@ envlist = py3{10,11,12,13,14},black,coverage,docformatter,docs,pylint,wheel,yamllint [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=dfwinreg --omit="*_test*,*__init__*,*test_lib*" run_tests.py coverage: coverage xml