Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Tests were not running on Windows #205

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 36 additions & 4 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
branches:
- main
schedule:
# Run every night at 04:00 (GitHub Actions timezone)
# in order to catch when unfrozen dependency updates
# break the use of the library.
- cron: '4 0 * * *'

jobs:
Expand All @@ -17,7 +14,7 @@ jobs:
fail-fast: false
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
os: [ubuntu-22.04, ubuntu-24.04]
os: [ubuntu-22.04, ubuntu-24.04, windows-2022]
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -29,17 +26,52 @@ jobs:
- run: |
sudo apt-get update
sudo apt-get install -y python3-pip libsodium-dev
if: runner.os == 'Linux'

- run: |
python3 -m venv /tmp/venv
/tmp/venv/bin/python -m pip install --upgrade pip hatch coverage
if: runner.os == 'Linux'

- run: |
python -m venv /tmp/venv
/tmp/venv/Scripts/python -m pip install --upgrade pip hatch coverage
if: runner.os == 'Windows'

- run: choco install pkgconfiglite
if: runner.os == 'Windows'

- name: Set up vcpkg
uses: lukka/get-vcpkg@v12
with:
vcpkgGitCommitId: 'latest'
if: runner.os == 'Windows'

- name: Install GMP
run: vcpkg install gmp
if: runner.os == 'Windows'

- name: Build project
run: cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake
if: runner.os == 'Windows'

- run: |
/tmp/venv/bin/pip freeze
/tmp/venv/bin/hatch run testing:pip freeze
/tmp/venv/bin/hatch run testing:test
if: runner.os == 'Linux'

- run: |
/tmp/venv/Scripts/pip freeze
/tmp/venv/Scripts/hatch run testing:pip freeze
/tmp/venv/Scripts/hatch run testing:test
if: runner.os == 'Windows'

- run: /tmp/venv/bin/hatch run testing:cov
if: runner.os == 'Linux'

- run: /tmp/venv/Scripts/hatch run testing:cov
if: runner.os == 'Windows'

- uses: codecov/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies = [
"aiohttp>=3.8.3",
"aioresponses>=0.7.6",
"aleph-message>=0.6",
"aleph-superfluid>=0.2.1",
"aleph-superfluid>=0.2.2",
"base58==2.1.1", # Needed now as default with _load_account changement
"coincurve; python_version<'3.11'",
"coincurve>=19; python_version>='3.11'",
Expand Down
Loading