Skip to content
Open
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: 9 additions & 4 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,23 @@ concurrency:

jobs:
run_tests:
name: Test the code
name: Test the code (${{ matrix.backend }}, ${{ matrix.version }}, shard ${{ matrix.shard }})
strategy:
fail-fast: false
matrix:
backend: [tensorflow, jax, torch]
version: [keras-stable]
shard: [1, 2, 3, 4]
include:
- backend: jax
version: keras-3.15
shard: 1
- backend: jax
version: keras-nightly
shard: 1
- backend: openvino
version: keras-nightly
shard: 1

container:
image: python:3.11-slim
Expand Down Expand Up @@ -65,13 +69,14 @@ jobs:
pip install keras-nightly --no-cache-dir --progress-bar off
- name: Test with pytest
run: |
pytest keras_hub/ -n auto --dist loadfile --durations=50
pytest keras_hub/ -n auto --dist loadfile --durations=50 --splits 4 --group ${{ matrix.shard }} --splitting-algorithm least_duration
- name: Run integration tests
if: ${{ matrix.shard == 1 }}
run: |
python pip_build.py --install
cd integration_tests && pytest . -k "not NoTensorflow"
- name: Run no tensorflow integration test
if: ${{ matrix.backend != 'tensorflow'}}
if: ${{ matrix.backend != 'tensorflow' && matrix.shard == 1 }}
run: |
pip uninstall -y tensorflow-text tensorflow
cd integration_tests && pytest . -k "NoTensorflow"
Expand Down Expand Up @@ -104,4 +109,4 @@ jobs:
- name: Install pre-commit
run: pip install pre-commit && pre-commit install
- name: Run pre-commit
run: pre-commit run --all-files --hook-stage manual
run: pre-commit run --all-files --hook-stage manual
1 change: 1 addition & 0 deletions requirements-common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ ruff
pytest
pytest-cov
pytest-xdist
pytest-split
build
namex
# Optional deps.
Expand Down
Loading