tests: mark and add skips (#2524)
* tests: mark and add skips Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * fix comment --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> Co-authored-by: Matthieu Darbois <mayeut@users.noreply.github.com>
This commit is contained in:
co-authored by
Matthieu Darbois
parent
55fcb25edc
commit
140bc1a96a
@@ -51,6 +51,7 @@ jobs:
|
|||||||
needs: lint
|
needs: lint
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-13, macos-15]
|
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-13, macos-15]
|
||||||
python_version: ['3.13']
|
python_version: ['3.13']
|
||||||
@@ -97,6 +98,7 @@ jobs:
|
|||||||
uv sync --no-dev --group test
|
uv sync --no-dev --group test
|
||||||
|
|
||||||
- uses: joerick/pr-labels-action@v1.0.9
|
- uses: joerick/pr-labels-action@v1.0.9
|
||||||
|
|
||||||
- name: Set CIBW_ENABLE
|
- name: Set CIBW_ENABLE
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -134,16 +136,16 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
package-dir: sample_proj
|
package-dir: sample_proj
|
||||||
output-dir: wheelhouse_only
|
output-dir: wheelhouse_only
|
||||||
only: cp312-${{ runner.os == 'Linux' && (runner.arch == 'ARM64' && 'manylinux_aarch64' || 'manylinux_x86_64') || (runner.os == 'Windows' && 'win_amd64' || 'macosx_x86_64') }}
|
only: cp313-${{ runner.os == 'Linux' && (runner.arch == 'ARM64' && 'manylinux_aarch64' || 'manylinux_x86_64') || (runner.os == 'Windows' && 'win_amd64' || 'macosx_x86_64') }}
|
||||||
|
|
||||||
- name: Create custom configuration file
|
- name: Create custom configuration file
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cat > sample_proj/cibw.toml <<EOF
|
cat > sample_proj/cibw.toml <<EOF
|
||||||
[tool.cibuildwheel]
|
[tool.cibuildwheel]
|
||||||
# Only build on CPython 3.12 on native arch
|
# Only build on CPython 3.13 on native arch
|
||||||
archs = ["native"]
|
archs = ["native"]
|
||||||
build = "cp312-*"
|
build = "cp313-*"
|
||||||
# Skip musllinux
|
# Skip musllinux
|
||||||
skip = "*-musllinux*"
|
skip = "*-musllinux*"
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
@@ -109,6 +109,9 @@ filterwarnings = ["error"]
|
|||||||
log_cli_level = "INFO"
|
log_cli_level = "INFO"
|
||||||
markers = [
|
markers = [
|
||||||
"serial: tests that must *not* be run in parallel (deselect with '-m \"not serial\"')",
|
"serial: tests that must *not* be run in parallel (deselect with '-m \"not serial\"')",
|
||||||
|
"ios: tests that run on iOS",
|
||||||
|
"android: tests that run on Android",
|
||||||
|
"pyodide: tests that run on Pyodide",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.mypy]
|
[tool.mypy]
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ import pytest
|
|||||||
from .test_projects import new_c_project
|
from .test_projects import new_c_project
|
||||||
from .utils import cibuildwheel_run, expected_wheels
|
from .utils import cibuildwheel_run, expected_wheels
|
||||||
|
|
||||||
|
pytestmark = pytest.mark.android
|
||||||
|
|
||||||
|
|
||||||
CIBW_PLATFORM = os.environ.get("CIBW_PLATFORM", "android")
|
CIBW_PLATFORM = os.environ.get("CIBW_PLATFORM", "android")
|
||||||
if CIBW_PLATFORM != "android":
|
if CIBW_PLATFORM != "android":
|
||||||
pytest.skip(f"{CIBW_PLATFORM=}", allow_module_level=True)
|
pytest.skip(f"{CIBW_PLATFORM=}", allow_module_level=True)
|
||||||
|
|||||||
@@ -12,6 +12,12 @@ from cibuildwheel.ci import CIProvider, detect_ci_provider
|
|||||||
|
|
||||||
from . import test_projects, utils
|
from . import test_projects, utils
|
||||||
|
|
||||||
|
pytestmark = pytest.mark.ios
|
||||||
|
|
||||||
|
CIBW_PLATFORM = os.environ.get("CIBW_PLATFORM", "ios")
|
||||||
|
if CIBW_PLATFORM != "ios":
|
||||||
|
pytest.skip(f"{CIBW_PLATFORM=}", allow_module_level=True)
|
||||||
|
|
||||||
basic_project_files = {
|
basic_project_files = {
|
||||||
"tests/test_platform.py": f"""
|
"tests/test_platform.py": f"""
|
||||||
import platform
|
import platform
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import contextlib
|
import contextlib
|
||||||
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import textwrap
|
import textwrap
|
||||||
@@ -9,6 +10,12 @@ from cibuildwheel.util.file import CIBW_CACHE_PATH
|
|||||||
|
|
||||||
from . import test_projects, utils
|
from . import test_projects, utils
|
||||||
|
|
||||||
|
pytestmark = pytest.mark.pyodide
|
||||||
|
|
||||||
|
CIBW_PLATFORM = os.environ.get("CIBW_PLATFORM", "pyodide")
|
||||||
|
if CIBW_PLATFORM != "pyodide":
|
||||||
|
pytest.skip(f"{CIBW_PLATFORM=}", allow_module_level=True)
|
||||||
|
|
||||||
basic_project = test_projects.new_c_project()
|
basic_project = test_projects.new_c_project()
|
||||||
basic_project.files["check_node.py"] = r"""
|
basic_project.files["check_node.py"] = r"""
|
||||||
import sys
|
import sys
|
||||||
|
|||||||
Reference in New Issue
Block a user