Skip to content

Commit 23f6574

Browse files
authored
Merge pull request #356 from BiAPoL/specify-test-conditions
added more python versions and OS to CI tests
2 parents 54d4b5c + c0e0494 commit 23f6574

File tree

2 files changed

+16
-41
lines changed

2 files changed

+16
-41
lines changed

.github/workflows/test_and_deploy.yml

Lines changed: 14 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ jobs:
2424
runs-on: ${{ matrix.platform }}
2525
strategy:
2626
matrix:
27-
platform: [ubuntu-latest, windows-latest] # macos-latest (disabled, see related issue)
28-
python-version: [3.8, 3.9]
27+
platform: [ubuntu-latest, windows-latest, macos-latest] # macos-latest (disabled, see related issue)
28+
python-version: ["3.9", "3.10", "3.11"]
2929

3030
steps:
3131
- uses: actions/checkout@v3
@@ -35,14 +35,8 @@ jobs:
3535
with:
3636
python-version: ${{ matrix.python-version }}
3737

38-
# these libraries, along with pytest-xvfb (added in the `deps` in tox.ini),
39-
# enable testing on Qt on linux
40-
- name: Install Linux libraries
41-
if: runner.os == 'Linux'
42-
run: |
43-
sudo apt-get install -y libdbus-1-3 libxkbcommon-x11-0 libxcb-icccm4 \
44-
libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 \
45-
libxcb-xinerama0 libxcb-xinput0 libxcb-xfixes0
38+
# these libraries enable testing on Qt on linux
39+
- uses: tlambert03/setup-qt-libs@v1
4640

4741
# strategy borrowed from vispy for installing opengl libs on windows
4842
- name: Install Windows OpenGL
@@ -55,41 +49,21 @@ jobs:
5549
# setup-miniconda: https://github.com/conda-incubator/setup-miniconda
5650
# and
5751
# tox-conda: https://github.com/tox-dev/tox-conda
58-
- name: Set up conda ${{ matrix.python-version }}
59-
uses: conda-incubator/setup-miniconda@v2.0.0
60-
with:
61-
auto-update-conda: true
62-
activate-environment: test
63-
python-version: ${{ matrix.python-version }}
64-
channels: conda-forge
65-
66-
- name: Conda info
67-
shell: bash -l {0}
68-
run: conda info
69-
7052
- name: Install dependencies
71-
shell: bash -l {0}
7253
run: |
73-
python --version
74-
conda install -y pyopencl hdbscan pip setuptools wheel pytest pytest-cov pytest-benchmark pytest-qt pyqt pytest-xvfb pandas
75-
# pip install setuptools tox tox-gh-actions
54+
python -m pip install --upgrade pip
55+
python -m pip install setuptools tox tox-gh-actions
7656
77-
pip install -e .
78-
# pip install setuptools tox tox-gh-actions
79-
# # conda install -c defaults scipy is needed otherwise tests crash on Windows due to FileNotFoundError. Remove this when the problem is fixed
80-
# # this runs the platform-specific tests declared in tox.ini
81-
# - name: Test with tox
82-
# run: tox
83-
# env:
84-
# PLATFORM: ${{ matrix.platform }}
85-
- name: Run tests
86-
shell: bash -l {0}
87-
run: pytest -v --cov=./ --cov-report=xml
57+
# this runs the platform-specific tests declared in tox.ini
58+
- name: Test with tox
59+
uses: aganders3/headless-gui@v2
60+
with:
61+
run: python -m tox
62+
env:
63+
PLATFORM: ${{ matrix.platform }}
8864

89-
- name: Upload coverage to Codecov
65+
- name: Coverage
9066
uses: codecov/codecov-action@v3
91-
with:
92-
token: ${{ secrets.CODECOV_TOKEN }}
9367

9468
deploy:
9569
# this will run when you have tagged a commit,

tox.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ platform =
2020
passenv =
2121
CI
2222
GITHUB_ACTIONS
23-
DISPLAY XAUTHORITY
23+
DISPLAY
24+
XAUTHORITY
2425
NUMPY_EXPERIMENTAL_ARRAY_FUNCTION
2526
PYVISTA_OFF_SCREEN
2627
deps =

0 commit comments

Comments
 (0)