diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index 66feefd13..6af6b11cf 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -158,8 +158,8 @@ jobs: - name: Run tests run: | - cd tests_mainnet pip install -r requirements.txt + cd tests_mainnet PYTHONPATH=$PYTHONPATH:/speculos pytest --headless --model=${{ matrix.model }} --timeout=300 job_test_python_lib_legacyapp: @@ -184,8 +184,8 @@ jobs: - name: Run tests run: | - cd bitcoin_client/tests pip install -r requirements.txt + cd bitcoin_client/tests PYTHONPATH=$PYTHONPATH:/speculos pytest --headless --timeout=300 --model=nanos job_perftests: @@ -217,8 +217,8 @@ jobs: - name: Run tests run: | - cd tests_perf pip install -r requirements.txt + cd tests_perf PYTHONPATH=$PYTHONPATH:/speculos pytest --headless --model=nanosp --benchmark-json=benchmarks.json - name: Upload benchmarks summary uses: actions/upload-artifact@v4 diff --git a/bitcoin_client/tests/requirements.txt b/requirements.txt similarity index 51% rename from bitcoin_client/tests/requirements.txt rename to requirements.txt index 502511278..94c9fd941 100644 --- a/bitcoin_client/tests/requirements.txt +++ b/requirements.txt @@ -1,10 +1,13 @@ -bip32>=3.4,<4.0 +# requirements for the various test suites + +pytest>=6.1.1,<7.0.0 +pytest-timeout>=2.1.0,<3.0.0 ledgercomm>=1.1.0,<1.2.0 ecdsa>=0.16.1,<0.17.0 +typing-extensions>=3.7,<4.0 embit>=0.7.0,<0.8.0 mnemonic==0.20 -pytest>=6.1.1,<7.0.0 -pytest-timeout>=2.1.0,<3.0.0 +bip32>=3.4,<4.0 speculos>=0.12.0,<0.13.0 -typing-extensions>=3.7,<4.0 --e ../ +ragger[speculos, ledgerwallet]>=1.6.0 +-e ./bitcoin_client # path relative to the current working directory; assume it's the root of the repo diff --git a/test_utils/requirements.txt b/test_utils/requirements.txt deleted file mode 100644 index c06bc9eb3..000000000 --- a/test_utils/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -mnemonic==0.20 -bip32>=3.4,<4.0 \ No newline at end of file diff --git a/tests/requirements.txt b/tests/requirements.txt index 390304519..5f09ca062 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,11 +1,3 @@ -pytest>=6.1.1,<7.0.0 -pytest-timeout>=2.1.0,<3.0.0 -ledgercomm>=1.1.0,<1.2.0 -ecdsa>=0.16.1,<0.17.0 -typing-extensions>=3.7,<4.0 -embit>=0.7.0,<0.8.0 -mnemonic==0.20 -bip32>=3.4,<4.0 -speculos>=0.12.0,<0.13.0 --e ../bitcoin_client -ragger[speculos, ledgerwallet]>=1.6.0 +# The reusable ragger workflow expects a requirements.txt file in the tests directory, but we want to just use the one in the repository's root. +# This works because the `pip install command` in the workflow is run from the repo's root. +-r ./requirements.txt diff --git a/tests_mainnet/requirements.txt b/tests_mainnet/requirements.txt deleted file mode 100644 index 08cfbf370..000000000 --- a/tests_mainnet/requirements.txt +++ /dev/null @@ -1,10 +0,0 @@ -bip32>=3.4,<4.0 -ledgercomm>=1.1.0,<1.2.0 -ecdsa>=0.16.1,<0.17.0 -embit>=0.7.0,<0.8.0 -mnemonic==0.20 -pytest>=6.1.1,<7.0.0 -pytest-timeout>=2.1.0,<3.0.0 -speculos>=0.12.0,<0.13.0 -typing-extensions>=3.7,<4.0 --e ../bitcoin_client diff --git a/tests_perf/requirements.txt b/tests_perf/requirements.txt deleted file mode 100644 index 24771981d..000000000 --- a/tests_perf/requirements.txt +++ /dev/null @@ -1,9 +0,0 @@ -bip32>=3.4,<4.0 -embit>=0.8.0,<0.9.0 -ledgercomm>=1.2.1,<2.0.0 -mnemonic==0.20 -pytest>=8.2.2,<9.0.0 -pytest-benchmark>=4.0.0,<5.0.0 -speculos>=0.12.0,<0.13.0 -typing-extensions>=3.7,<4.0 --e ../bitcoin_client