Closed Davide-sd closed 1 year ago
do you know how to solve it? I have a same problem.
@xiaofeiso you have to install appropriate dependencies based on the OS you are running tests. I'm going to copy a section of a python-package.yml
which used to work with Ubuntu 20.04, but doesn't work with Ubunu 22.04. The commented section is what you need (and probably have to fix).
name: Python package
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
# - name: Install Linux packages for Qt5 support # needed for Mayavi
# run: |
# sudo apt-get update
# sudo apt-get install qt5-default
# 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: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest coverage
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
very thanks
I'm trying to get Github Actions to run my tests (involving Mayavi). However, the run fails when executing the following line of code:
Those are the requirements of my package and this is the traceback (here is the full report):
Everything works fine on my local system, so I'm guessing this is happening because Github Actions runs headless. What can I do to make it works?