Add tests to Windows CI

This commit is contained in:
Rayyan Ansari 2023-01-11 18:40:57 +00:00
parent e74b42920c
commit b19d2c1449
No known key found for this signature in database
GPG Key ID: 46A8D18E5BC49D84
2 changed files with 14 additions and 3 deletions

View File

@ -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"

View File

@ -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