diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e2cc57f7c..736433158 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ on: branches: [main] jobs: - fast: + test: strategy: matrix: python-version: ["3.8", "3.9", "3.10", "3.11"] @@ -35,8 +35,8 @@ jobs: - name: Setup testdata uses: "./.github/actions/setup_testdata" - - name: Run fast tests - run: pytest --disable-warnings -x --hypothesis-profile ci-fast + - name: Run tests + run: pytest -n 4 tests --disable-warnings hypothesis: runs-on: ubuntu-latest @@ -54,7 +54,7 @@ jobs: uses: "./.github/actions/setup_testdata" - name: Run just hypothesis tests with more examples - run: python -m pytest --disable-warnings -x -m hypothesis --hypothesis-profile ci --generate-plots + run: pytest -n 4 tests --disable-warnings -m hypothesis --generate-plots big: runs-on: ubuntu-latest @@ -72,7 +72,7 @@ jobs: uses: "./.github/actions/setup_testdata" - name: Run just tests marked big - run: XTG_BIGTEST=1 python -m pytest --disable-warnings -x -m bigtest --hypothesis-profile ci --generate-plots + run: XTG_BIGTEST=1 pytest -n 4 tests --disable-warnings -m bigtest --generate-plots codecov: runs-on: ubuntu-latest @@ -89,9 +89,8 @@ jobs: - name: Setup testdata uses: "./.github/actions/setup_testdata" - - name: Generate coverage report - run: pytest tests --doctest-modules --generate-plots --disable-warnings --cov=xtgeo --hypothesis-profile ci-fast --cov-report=xml:xtgeocoverage.xml; + run: pytest -n 4 tests --doctest-modules --generate-plots --disable-warnings --cov=xtgeo --cov-report=xml:xtgeocoverage.xml; - name: Upload coverage to Codecov uses: codecov/codecov-action@v2 diff --git a/conftest.py b/conftest.py index bdce2c0e8..e939d83a1 100644 --- a/conftest.py +++ b/conftest.py @@ -5,14 +5,11 @@ from hypothesis import HealthCheck, settings settings.register_profile( - "ci", max_examples=250, deadline=None, suppress_health_check=[HealthCheck.too_slow] -) -settings.register_profile( - "ci-fast", - max_examples=10, + "no_timeouts", deadline=None, suppress_health_check=[HealthCheck.too_slow], ) +settings.load_profile("no_timeouts") @pytest.fixture diff --git a/pyproject.toml b/pyproject.toml index ea926fb21..f0ab65b1d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -129,7 +129,7 @@ before-test = [ test-command = [ "pushd {package}", # Ignore forking tests as they do not work well with CIBW - 'pytest --disable-warnings -x -m "not hypothesis" --ignore tests/test_well --ignore-glob="*forks.py"', + 'pytest -n 4 tests --disable-warnings -m "not hypothesis" --ignore tests/test_well --ignore-glob="*forks.py"', ] [tool.isort]