Skip to content
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
38 changes: 20 additions & 18 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ permissions:
contents: write

jobs:
compare-php:
tests:
name: "${{ matrix.php_api == true && 'Migration' || 'Python-only' }} ${{ matrix.mutations == true && 'with mutations' || 'read-only' }}"
strategy:
matrix:
php_api: [true, false]
mutations: [true, false]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
Expand All @@ -21,23 +26,20 @@ jobs:
python-version: 3.x

# https://github.com/docker/compose/issues/10596
- run: docker compose --profile "python" --profile "php" up --detach --wait --remove-orphans || exit $(docker compose ps -q | xargs docker inspect -f '{{.State.ExitCode}}' | grep -v '^0' | wc -l)
- run: docker exec openml-python-rest-api coverage run -m pytest -v -m "php_api"
- run: docker exec openml-python-rest-api coverage xml
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.x
- run: docker compose --profile "python" up --detach --wait --remove-orphans || exit $(docker compose ps -q | xargs docker inspect -f '{{.State.ExitCode}}' | grep -v '^0' | wc -l)
- run: docker exec openml-python-rest-api coverage run -m pytest -v -m "not php_api"
- run: docker exec openml-python-rest-api coverage xml
- name: Start services
run: |
profiles="--profile python"
if [ "${{ matrix.php_api }}" = "true" ]; then
profiles="$profiles --profile php"
fi
docker compose $profiles up --detach --wait --remove-orphans || exit $(docker compose ps -q | xargs docker inspect -f '{{.State.ExitCode}}' | grep -v '^0' | wc -l)

- name: Run tests
run: |
marker="${{ matrix.php_api == true && 'php_api' || 'not php_api' }} and ${{ matrix.mutations == true && 'mut' || 'not mut' }}"
docker exec openml-python-rest-api coverage run -m pytest -n auto -v -m "$marker"
- name: Produce coverage report
run: docker exec openml-python-rest-api coverage xml
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ dev = [
"httpx",
"hypothesis",
"deepdiff",
"pytest-xdist",
]
docs = [
"mkdocs-material",
Expand Down
2 changes: 1 addition & 1 deletion tests/routers/openml/datasets_list_datasets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def test_list_data_quality(quality: str, range_: str, count: int, py_api: TestCl

@pytest.mark.slow
@hypothesis.settings( # type: ignore[untyped-decorator] # 108
max_examples=5000,
max_examples=500, # This number needs to be better motivated
suppress_health_check=[hypothesis.HealthCheck.function_scoped_fixture],
deadline=None,
)
Expand Down