From ae2f21263e27f3b0b8061197e3569129c770e49f Mon Sep 17 00:00:00 2001 From: Lendemor Date: Wed, 9 Oct 2024 14:47:56 +0200 Subject: [PATCH] update workflow --- .github/workflows/unit_tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 09e489949..fc65402e0 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -41,6 +41,7 @@ jobs: - os: windows-latest python-version: '3.9.13' runs-on: ${{ matrix.os }} + # Service containers to run with `runner-job` services: # Label used to access the service container @@ -63,6 +64,8 @@ jobs: run-poetry-install: true create-venv-at-path: .venv - name: Run unit tests + # Run the macOS job only on merge to the main branch + if: matrix.os != 'macos-12' || (github.event_name == 'push' && github.ref == 'refs/heads/main') run: | export PYTHONUNBUFFERED=1 poetry run pytest tests/units --cov --no-cov-on-fail --cov-report= @@ -74,6 +77,7 @@ jobs: poetry run pytest tests/units --cov --no-cov-on-fail --cov-report= # Change to explicitly install v1 when reflex-hosting-cli is compatible with v2 - name: Run unit tests w/ pydantic v1 + if: matrix.os != 'macos-12' || (github.event_name == 'push' && github.ref == 'refs/heads/main') run: | export PYTHONUNBUFFERED=1 poetry run uv pip install "pydantic~=1.10"