Merge pull request #222 from hyperspy/dependabot/github_actions/actio… #109
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: [push, pull_request] | |
jobs: | |
run_test_site: | |
name: py${{ matrix.PYTHON_VERSION }}-hs_${{ matrix.HYPERSPY_VERSION }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
env: | |
HYPERSPY_DEV: false | |
DISPLAY: ':0' | |
strategy: | |
fail-fast: false | |
matrix: | |
PYTHON_VERSION: ['3.7', '3.9', '3.10', '3.11'] | |
HYPERSPY_VERSION: ['release'] | |
include: | |
- PYTHON_VERSION: '3.8' | |
HYPERSPY_VERSION: 'RnMinor' | |
- PYTHON_VERSION: '3.8' | |
HYPERSPY_VERSION: 'RnMajor' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: ${{ matrix.PYTHON_VERSION }} | |
- name: Display version | |
run: | | |
python --version | |
pip --version | |
- name: Install Ubuntu packages for Qt | |
shell: bash | |
run: | | |
sudo apt-get update | |
sudo apt-get install qtbase5-dev | |
sudo apt-get install libxkbcommon-x11-0 | |
sudo apt-get install libxcb-icccm4 | |
sudo apt-get install libxcb-image0 | |
sudo apt-get install libxcb-keysyms1 | |
sudo apt-get install libxcb-randr0 | |
sudo apt-get install libxcb-render-util0 | |
sudo apt-get install libxcb-xinerama0 | |
- name: Install Dependencies | |
run: | | |
pip install pyqt5 PyQtWebEngine | |
- name: Install HyperSpy (RELEASE_next_minor) | |
shell: bash | |
if: "contains( matrix.HYPERSPY_VERSION, 'RnMinor')" | |
run: | | |
pip install https://github.com/hyperspy/hyperspy/archive/RELEASE_next_minor.zip | |
- name: Install HyperSpy (RELEASE_next_major) | |
shell: bash | |
if: "contains( matrix.HYPERSPY_VERSION, 'RnMajor')" | |
run: | | |
# We currently need to install these development until hyperspy 2.0 is released | |
pip install https://github.com/hyperspy/rosettasciio/archive/main.zip | |
pip install https://github.com/hyperspy/hyperspy_gui_traitsui/archive/main.zip | |
pip install https://github.com/hyperspy/hyperspy/archive/RELEASE_next_major.zip | |
- name: Install | |
shell: bash | |
run: | | |
pip install --upgrade -e .[tests] | |
- name: Pip list | |
run: | | |
pip list | |
- name: Run test suite | |
run: | | |
sudo apt-get install xvfb | |
xvfb-run pytest --pyargs hyperspyui |