Skip to content

Commit

Permalink
does it work on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
nggit committed Dec 20, 2024
1 parent a8b48b8 commit 00f2454
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/tests_and_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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: |
Expand All @@ -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
Expand Down

0 comments on commit 00f2454

Please sign in to comment.