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

Test minimum conda supported #5054

Merged
merged 4 commits into from
Nov 3, 2023
Merged
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
13 changes: 11 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,18 @@ jobs:
fail-fast: false
matrix:
# test all lower versions (w/ stable conda) and upper version (w/ canary conda)
python-version: ['3.8', '3.9', '3.10']
python-version: ['3.9', '3.10']
conda-version: [release]
test-type: [serial, parallel]
include:
# minimum Python/conda combo
- python-version: '3.8'
conda-version: 22.11.0
test-type: serial
- python-version: '3.8'
conda-version: 22.11.0
test-type: parallel
# maximum Python/conda combo
- python-version: '3.11'
conda-version: canary
test-type: serial
Expand All @@ -81,6 +89,7 @@ jobs:
test-type: parallel
env:
CONDA_CHANNEL_LABEL: ${{ matrix.conda-version == 'canary' && 'conda-canary/label/dev' || 'defaults' }}
CONDA_VERSION: ${{ contains('canary,release', matrix.conda-version) && 'conda' || format('conda={0}', matrix.conda-version) }}
REPLAY_NAME: Linux-${{ matrix.conda-version }}-Py${{ matrix.python-version }}
REPLAY_DIR: ${{ github.workspace }}/pytest-replay
ALLURE_DIR: ${{ github.workspace }}/allure-results
Expand Down Expand Up @@ -115,7 +124,7 @@ jobs:
conda install -q -y -c defaults \
--file ./tests/requirements.txt \
--file ./tests/requirements-linux.txt \
${{ env.CONDA_CHANNEL_LABEL }}::conda
${{ env.CONDA_CHANNEL_LABEL }}::${{ env.CONDA_VERSION }}
pip install -e .

- name: Show info
Expand Down
3 changes: 2 additions & 1 deletion tests/test_deprecations.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
import sys

import pytest
from conda.deprecations import DeprecatedError, DeprecationHandler

from conda_build.deprecations import DeprecatedError, DeprecationHandler


@pytest.fixture(scope="module")
Expand Down
18 changes: 12 additions & 6 deletions tests/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
import sys

import pytest
from conda import __version__ as conda_version
from conda.base.context import context
from packaging.version import Version
from pytest import MonkeyPatch

from conda_build import api
Expand Down Expand Up @@ -362,25 +364,20 @@ def test_yamlize_versions():
assert yml == ["1.2.3", "1.2.3.4"]


OS_ARCH = (
OS_ARCH: tuple[str, ...] = (
"aarch64",
"arm",
"arm64",
"armv6l",
"armv7l",
"emscripten",
"freebsd",
"linux",
"linux32",
"linux64",
"osx",
"ppc64",
"ppc64le",
"riscv64",
"s390x",
"unix",
"wasi",
"wasm32",
"win",
"win32",
"win64",
Expand All @@ -390,6 +387,15 @@ def test_yamlize_versions():
"zos",
)

if Version(conda_version) >= Version("23.3"):
OS_ARCH = (*OS_ARCH, "riscv64")

if Version(conda_version) >= Version("23.7"):
OS_ARCH = (*OS_ARCH, "freebsd")

if Version(conda_version) >= Version("23.9"):
OS_ARCH = (*OS_ARCH, "emscripten", "wasi", "wasm32")


@pytest.mark.parametrize(
(
Expand Down
Loading