From b19d2c14491f64898d20eacb972ab9acb25faac2 Mon Sep 17 00:00:00 2001 From: Rayyan Ansari Date: Wed, 11 Jan 2023 18:40:57 +0000 Subject: [PATCH] Add tests to Windows CI --- .github/workflows/windows.yml | 13 ++++++++++--- scripts/msys2-install-deps | 4 ++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index f42df65a..605a8a1e 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -1,6 +1,10 @@ name: Windows CI on: [push, pull_request] +env: + SETUPTOOLS_USE_DISTUTILS: stdlib # Needed for pip to work - https://www.msys2.org/docs/python/#known-issues + PY_COLORS: 1 + jobs: msys2-ucrt64: runs-on: windows-latest @@ -16,12 +20,15 @@ jobs: msystem: UCRT64 update: true - name: Install dependencies - run: ./scripts/msys2-install-deps + run: ./scripts/msys2-install-deps development - name: Build run: ./scripts/msys2-build - - name: Test - run: ./dist/borg.exe -V - uses: actions/upload-artifact@v3 with: name: borg-windows path: dist/borg.exe + - name: Run tests + run: | + ./dist/borg.exe -V + pip install -e . + pytest --benchmark-skip -k "not remote" diff --git a/scripts/msys2-install-deps b/scripts/msys2-install-deps index 7579a137..39fae4c7 100644 --- a/scripts/msys2-install-deps +++ b/scripts/msys2-install-deps @@ -2,3 +2,7 @@ pacman -S --needed --noconfirm git mingw-w64-ucrt-x86_64-{toolchain,pkgconf,zstd,lz4,xxhash,openssl,python,cython,python-setuptools,python-wheel,python-pkgconfig,python-packaging,python-msgpack,python-argon2_cffi,python-pip} pip install pyinstaller + +if [ "$1" = "development" ]; then + pacman -S --needed --noconfirm mingw-w64-ucrt-x86_64-python-{pytest,pytest-benchmark,pytest-cov,pytest-forked,pytest-xdist} +fi