From 0f40520b8cd7c22f8eb3b6f904bbe7a7d5917e62 Mon Sep 17 00:00:00 2001 From: Tom White Date: Wed, 1 May 2024 08:56:09 +0100 Subject: [PATCH] Treat warnings as errors when running tests --- .github/workflows/beam-tests.yml | 2 +- .github/workflows/dask-tests.yml | 2 +- .github/workflows/jax-tests.yml | 2 +- .github/workflows/modal-tests.yml | 2 +- .github/workflows/slow-tests.yml | 2 +- .github/workflows/tests.yml | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/beam-tests.yml b/.github/workflows/beam-tests.yml index 463196b2b..ff8296da1 100644 --- a/.github/workflows/beam-tests.yml +++ b/.github/workflows/beam-tests.yml @@ -42,4 +42,4 @@ jobs: - name: Run tests run: | - pytest -vs + pytest -vs -Werror diff --git a/.github/workflows/dask-tests.yml b/.github/workflows/dask-tests.yml index ffb1cf09e..286b7fd9a 100644 --- a/.github/workflows/dask-tests.yml +++ b/.github/workflows/dask-tests.yml @@ -42,4 +42,4 @@ jobs: - name: Run tests run: | - pytest -vs + pytest -vs -Werror diff --git a/.github/workflows/jax-tests.yml b/.github/workflows/jax-tests.yml index e8ca86628..0da98f3e9 100644 --- a/.github/workflows/jax-tests.yml +++ b/.github/workflows/jax-tests.yml @@ -43,7 +43,7 @@ jobs: - name: Run tests run: | # exclude tests that rely on structured types since JAX doesn't support these - pytest -k "not argmax and not argmin and not mean and not apply_reduction and not broadcast_trick and not groupby" + pytest -Werror -k "not argmax and not argmin and not mean and not apply_reduction and not broadcast_trick and not groupby" env: CUBED_BACKEND_ARRAY_API_MODULE: jax.numpy JAX_ENABLE_X64: True diff --git a/.github/workflows/modal-tests.yml b/.github/workflows/modal-tests.yml index 4d48629ae..56bfb37e5 100644 --- a/.github/workflows/modal-tests.yml +++ b/.github/workflows/modal-tests.yml @@ -38,7 +38,7 @@ jobs: - name: Run tests run: | - pytest -vs -k "test_modal.py or modal" --runcloud + pytest -vs -Werror -k "test_modal.py or modal" --runcloud env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/slow-tests.yml b/.github/workflows/slow-tests.yml index 3dd5393eb..7b19c1236 100644 --- a/.github/workflows/slow-tests.yml +++ b/.github/workflows/slow-tests.yml @@ -43,4 +43,4 @@ jobs: - name: Run tests run: | - pytest -vs -k slow --runslow + pytest -vs -Werror -k slow --runslow diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4d75baa3e..eb923a3b4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -57,8 +57,8 @@ jobs: - name: Run tests run: | if [ "$RUNNER_OS" == "Windows" ]; then - pytest -v + pytest -v -Werror else - pytest -v --cov=cubed --cov-report=term-missing --cov-fail-under=90 + pytest -v -Werror --cov=cubed --cov-report=term-missing --cov-fail-under=90 fi shell: bash