From 00f24541d80a24267b27a269b19a54fb91ad0013 Mon Sep 17 00:00:00 2001 From: nggit <12218311+nggit@users.noreply.github.com> Date: Fri, 20 Dec 2024 07:25:21 +0700 Subject: [PATCH] does it work on macOS --- .github/workflows/tests_and_coverage.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests_and_coverage.yml b/.github/workflows/tests_and_coverage.yml index 1e0eebe..8b77362 100644 --- a/.github/workflows/tests_and_coverage.yml +++ b/.github/workflows/tests_and_coverage.yml @@ -22,20 +22,23 @@ jobs: - '3.7' - '3.6' - 'pypy3.10' - os: ['ubuntu-20.04', 'windows-latest'] + os: ['ubuntu-20.04', 'windows-latest', 'macos-latest'] timeout-minutes: 10 steps: - uses: actions/checkout@v4 + if: ${{ !startsWith(matrix.os, 'macos-') || matrix.python_version == '3.13' }} - name: Setup Python uses: actions/setup-python@v4 with: python-version: ${{ matrix.python_version }} + if: ${{ !startsWith(matrix.os, 'macos-') || matrix.python_version == '3.13' }} - name: Install dependencies run: | python -m pip install --upgrade pip python -m pip install --upgrade coverage + if: ${{ !startsWith(matrix.os, 'macos-') || matrix.python_version == '3.13' }} - name: Lint run: | @@ -47,14 +50,16 @@ jobs: - name: Run tests run: python alltests.py - if: ${{ matrix.python_version != '3.13' }} + if: | + matrix.python_version != '3.13' && !startsWith(matrix.os, 'macos-') || + matrix.python_version == '3.13' && startsWith(matrix.os, 'macos-') - name: Run tests with coverage run: | python -m coverage run alltests.py python -m coverage combine mkdir artifact && mv .coverage artifact/.coverage.${{ matrix.os }} - if: ${{ matrix.python_version == '3.13' && !startsWith(matrix.os, 'windows-') }} + if: ${{ matrix.python_version == '3.13' && startsWith(matrix.os, 'ubuntu-') }} - name: Run tests with coverage on Windows run: | @@ -68,7 +73,7 @@ jobs: with: path: artifact include-hidden-files: true - if: ${{ matrix.python_version == '3.13' }} + if: ${{ matrix.python_version == '3.13' && !startsWith(matrix.os, 'macos-') }} report: name: Upload coverage to SonarCloud Scan