diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index 2bcbc13ae..16c185feb 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -15,8 +15,10 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] python-version: ["3.7", "3.8", "3.9", "3.10", "3.11.0-rc.1"] exclude: - - os: macos-latest - python-version: "3.10" + # 1. lxml built-from-source fails or produces unreliable results on these platforms + # 2. binary wheels are less likely to be available for release candidate versions of Python + # 3. GitHub Actions cancels all jobs in a batch when a single job fails + # ... so skip these platforms - os: macos-latest python-version: "3.11.0-rc.1" - os: windows-latest @@ -28,6 +30,12 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + # The system-provided libxml2 on MacOS is typically outdated and this can lead to lxml parsing issues + # Using PyPi-provided binary wheels instead resolves this + # We are affected by https://bugs.launchpad.net/lxml/+bug/1949271 in test_wild_mode when using system-provided libxml2 on MacOS + - name: Install lxml from wheel on MacOS + if: ${{ matrix.os == 'macos-latest' }} + run: pip install --only-binary=lxml lxml - name: Install dependencies run: | python -m pip install --upgrade pip