Skip to content

Commit 0baaabc

Browse files
committed
github: Expand install & test matrix to include pypy3 & macos.
The matrix should now cover a similar range of environments as were covered with Travis CI.
1 parent 114ec0d commit 0baaabc

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

.github/workflows/lint-and-test.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,33 @@ jobs:
4444
run: ./tools/run-isort-check
4545

4646
pytest:
47-
runs-on: ubuntu-latest
4847
strategy:
4948
# Not failing fast allows all matrix jobs to try & finish even if one fails early
5049
fail-fast: false
5150
matrix:
52-
test-python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
53-
name: Install & pytest - CPython ${{ matrix.test-python-version }}
51+
env:
52+
- {PYTHON: 3.5, OS: ubuntu-latest, NAME: "CPython 3.5 (ubuntu)"}
53+
- {PYTHON: 3.6, OS: ubuntu-latest, NAME: "CPython 3.6 (ubuntu)"}
54+
- {PYTHON: 3.7, OS: ubuntu-latest, NAME: "CPython 3.7 (ubuntu)"}
55+
- {PYTHON: 3.8, OS: ubuntu-latest, NAME: "CPython 3.8 (ubuntu)"}
56+
- {PYTHON: 3.9, OS: ubuntu-latest, NAME: "CPython 3.9 (ubuntu)"}
57+
- {PYTHON: 'pypy3', OS: ubuntu-latest, NAME: "PyPy 3 (ubuntu)"}
58+
- {PYTHON: 3.9, OS: macos-latest, NAME: "CPython 3.9 (macos)"}
59+
runs-on: ${{ matrix.env.OS }}
60+
name: Install & test - ${{ matrix.env.NAME}}
5461
steps:
5562
- uses: actions/checkout@v2
56-
- name: Install Python 3
63+
- name: Install Python version ${{ matrix.env.PYTHON }}
5764
uses: actions/setup-python@v1
5865
with:
59-
python-version: ${{ matrix.test-python-version }}
66+
python-version: ${{ matrix.env.PYTHON }}
67+
- name: Output Python version
68+
run: python --version
6069
- name: Upgrade pip
6170
run: python -m pip install --upgrade pip
71+
- name: Ensure libxml-related libraries are installed (pypy3 only)
72+
if: matrix.env.PYTHON == 'pypy3'
73+
run: sudo apt install libxml2-dev libxslt1-dev
6274
- name: Ensure regular package installs from checkout
6375
run: pip install .
6476
- name: Install test dependencies

0 commit comments

Comments
 (0)