From 2eb8894d92f050e6962cae9f7298e0bd1ac0b547 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Sun, 15 Oct 2023 00:33:12 +0200 Subject: [PATCH] Use a requirement file for test requirements --- .github/workflows/core.yml | 3 ++- .github/workflows/doc.yml | 3 ++- .github/workflows/icc.yml | 3 ++- .github/workflows/parallel.yml | 3 ++- .github/workflows/windows.yml | 3 ++- docs/DEVGUIDE.rst | 8 ++++++-- pythran/tests/requirements.txt | 4 ++++ 7 files changed, 20 insertions(+), 7 deletions(-) create mode 100644 pythran/tests/requirements.txt diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index f04085bbe..94cf01f88 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -24,7 +24,8 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt - pip install ipython nbval pytest-xdist cython wheel + pip install -r pythran/tests/requirements.txt + pip install pytest-xdist sudo apt install libopenblas-dev ${{ matrix.cpp-version }} if test ${{ matrix.python-version }} != 'pypy-3.9'; then pip install scipy ; fi - name: Setup diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index dd24bef35..356e2a83b 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -24,7 +24,8 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt - pip install ipython nbval pytest-xdist cython scipy wheel + pip install -r pythran/tests/requirements.txt scipy + pip install pytest-xdist sudo apt install libopenblas-dev ${{ matrix.cpp-version }} - name: Setup run: | diff --git a/.github/workflows/icc.yml b/.github/workflows/icc.yml index f2efce2d8..38a9f6273 100644 --- a/.github/workflows/icc.yml +++ b/.github/workflows/icc.yml @@ -24,7 +24,8 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt - pip install ipython nbval pytest-xdist cython wheel + pip install -r pythran/tests/requirements.txt + pip install pytest-xdist if test ${{ matrix.python-version }} != '3.10' ; then pip install scipy ; fi wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list diff --git a/.github/workflows/parallel.yml b/.github/workflows/parallel.yml index 7539e07c8..ec469b581 100644 --- a/.github/workflows/parallel.yml +++ b/.github/workflows/parallel.yml @@ -24,7 +24,8 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt - pip install ipython nbval pytest-xdist cython scipy wheel + pip install -r pythran/tests/requirements.txt scipy + pip install pytest-xdist sudo apt install libopenblas-dev ${{ matrix.cpp-version }} - name: Setup run: | diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 169d0c7af..05447e2e3 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -28,7 +28,8 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt - pip install scipy wheel pythran-openblas pytest + pip install -r pythran/tests/requirements.txt scipy + pip install pythran-openblas pytest - name: Setup run: | python setup.py install diff --git a/docs/DEVGUIDE.rst b/docs/DEVGUIDE.rst index ad2b84a1f..f2aaec98d 100644 --- a/docs/DEVGUIDE.rst +++ b/docs/DEVGUIDE.rst @@ -68,8 +68,12 @@ Validation ---------- ``pythran`` uses the ``unittest`` module and the `pytest -`_ package to manage test cases. The whole -validation suite is run through the command:: +`_ package to manage test cases. + +All requirementsa r elisted in ``pythran/tests/requirements.txt``. + + +The whole validation suite is run through the command:: $> python -m pytest pythran/tests diff --git a/pythran/tests/requirements.txt b/pythran/tests/requirements.txt new file mode 100644 index 000000000..2b2e3b902 --- /dev/null +++ b/pythran/tests/requirements.txt @@ -0,0 +1,4 @@ +ipython +nbval +cython +wheel