Skip to content

Commit

Permalink
Workaround: install lxml from binary wheel when unit tests run on Mac…
Browse files Browse the repository at this point in the history
…OS (#629)
  • Loading branch information
jayaddison committed Oct 12, 2022
1 parent e33181a commit 401070d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/unittests.yaml
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 401070d

Please sign in to comment.