From dca2fce5c4872836efa74f0287fcce913a6b9d31 Mon Sep 17 00:00:00 2001 From: Hugo Herter Date: Wed, 5 Mar 2025 12:05:34 +0100 Subject: [PATCH] Fix: Tests were not running on macOS --- .github/workflows/pytest.yml | 22 ++++++++++++++-------- pyproject.toml | 1 - 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index f1af47c5..75bc8193 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -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: @@ -16,8 +13,8 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ "3.9", "3.10", "3.11", "3.12" ] - os: [ubuntu-22.04, ubuntu-24.04] + python-version: ["3.9", "3.10", "3.11", "3.12"] + os: [ubuntu-22.04, ubuntu-24.04, macos-14, macos-15] runs-on: ${{ matrix.os }} steps: @@ -26,15 +23,24 @@ jobs: with: python-version: ${{ matrix.python-version }} - - run: | + - name: "apt-get install" + run: | sudo apt-get update - sudo apt-get install -y python3-pip libsodium-dev + sudo apt-get install -y python3-pip libsodium-dev libgmp-dev + if: runner.os == 'Linux' - run: | + brew install libsodium + echo "DYLD_LIBRARY_PATH=$(brew --prefix libsodium)/lib" >> $GITHUB_ENV + if: runner.os == 'macOS' + + - name: "Install Hatch" + run: | python3 -m venv /tmp/venv /tmp/venv/bin/python -m pip install --upgrade pip hatch coverage - - run: | + - name: "Run Tests" + run: | /tmp/venv/bin/pip freeze /tmp/venv/bin/hatch run testing:pip freeze /tmp/venv/bin/hatch run testing:test diff --git a/pyproject.toml b/pyproject.toml index 42156baf..fb0792f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -80,7 +80,6 @@ optional-dependencies.substrate = [ "substrate-interface", ] optional-dependencies.tezos = [ - "pynacl", "pytezos-crypto==3.13.4.1", ] urls.Documentation = "https://aleph.im/"