fix units-text with macOS excluded

This commit is contained in:
Lendemor 2024-10-09 15:11:06 +02:00
parent 644fed3389
commit 74e324c9ab

View File

@ -27,7 +27,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ubuntu-latest, windows-latest, macos-12] os: [ubuntu-latest, windows-latest]
python-version: ['3.9.18', '3.10.13', '3.11.5', '3.12.0'] python-version: ['3.9.18', '3.10.13', '3.11.5', '3.12.0']
# Windows is a bit behind on Python version availability in Github # Windows is a bit behind on Python version availability in Github
exclude: exclude:
@ -37,7 +37,6 @@ jobs:
python-version: '3.9.18' python-version: '3.9.18'
- os: macos-12 - os: macos-12
python-version: '3.12.0' python-version: '3.12.0'
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
include: include:
- os: windows-latest - os: windows-latest
python-version: '3.10.11' python-version: '3.10.11'
@ -62,14 +61,11 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: ./.github/actions/setup_build_env - uses: ./.github/actions/setup_build_env
if: matrix.os != 'macos-12' || (github.event_name == 'push' && github.ref == 'refs/heads/main')
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
run-poetry-install: true run-poetry-install: true
create-venv-at-path: .venv create-venv-at-path: .venv
- name: Run unit tests - 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: | run: |
export PYTHONUNBUFFERED=1 export PYTHONUNBUFFERED=1
poetry run pytest tests/units --cov --no-cov-on-fail --cov-report= poetry run pytest tests/units --cov --no-cov-on-fail --cov-report=
@ -81,12 +77,10 @@ jobs:
poetry run pytest tests/units --cov --no-cov-on-fail --cov-report= 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 # Change to explicitly install v1 when reflex-hosting-cli is compatible with v2
- name: Run unit tests w/ pydantic v1 - name: Run unit tests w/ pydantic v1
if: matrix.os != 'macos-12' || (github.event_name == 'push' && github.ref == 'refs/heads/main')
run: | run: |
export PYTHONUNBUFFERED=1 export PYTHONUNBUFFERED=1
poetry run uv pip install "pydantic~=1.10" poetry run uv pip install "pydantic~=1.10"
poetry run pytest tests/units --cov --no-cov-on-fail --cov-report= poetry run pytest tests/units --cov --no-cov-on-fail --cov-report=
- name: Generate coverage report - name: Generate coverage report
if: matrix.os != 'macos-12' || (github.event_name == 'push' && github.ref == 'refs/heads/main')
run: poetry run coverage html run: poetry run coverage html