diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e2cc57f7c..7979a2f49 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ on: branches: [main] jobs: - fast: + all: 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,8 @@ 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 +90,9 @@ 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