Skip to content

Commit

Permalink
ci: use matrix include, exclude to fix The workflow is not valid
Browse files Browse the repository at this point in the history
  • Loading branch information
Ljzd-PRO committed May 15, 2024
1 parent 44cfd9c commit 25df82c
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,26 @@ jobs:
test:
name: Test With Coverage
runs-on: ${{ matrix.os }}

# macos-latest only supporting newer versions of Python
# Use macos-13 because it seems that Pydantic currently not support macOS ARM64 on 3.11, 3.12
if: ${{ (matrix.os != "macos-latest" || contains(["3.11", "3.12"], matrix.python-version)) && (matrix.os != "macos-13" || !contains(["3.11", "3.12"], matrix.python-version)) }}

concurrency:
group: test-coverage-${{ github.ref }}-${{ matrix.os }}-${{ matrix.python-version }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

# macos-14 aka. macos-latest has switched to being an ARM runner, only supporting newer versions of Python.
# https://github.com/actions/setup-python/issues/855#issuecomment-2096792205
os: [ubuntu-latest, windows-latest, macos-13, macos-latest]

fail-fast: false
os: [ubuntu-latest, windows-latest, macos-13]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
include: # Use macos-latest here because it seems that Pydantic currently not support macOS ARM64 on 3.11, 3.12
- os: macos-latest
python-version: "3.11"
- os: macos-latest
python-version: "3.12"
exclude:
- os: macos-13
python-version: "3.11"
- os: macos-13
python-version: "3.12"

steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit 25df82c

Please sign in to comment.