Skip to content

Commit

Permalink
refactor(test.yml): Optimize Linux test setup and add conditional xvf…
Browse files Browse the repository at this point in the history
…b-run
  • Loading branch information
chenmozhijin committed Dec 8, 2024
1 parent 3ffb65c commit 7e1e43a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ jobs:
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
libegl1-mesa \
libxcb-xinerama0 \
xauth \
xvfb \
libgl1-mesa-glx
sudo apt-get install -y sudo apt-get install -y qtbase5-dev libqt5gui5 libqt5widgets5 xvfb
- name: Run tests
run: |
pytest --cov=lddc --cov-report=xml --cov-report=html --disable-warnings
if [ "${{ runner.os }}" == "Linux" ]; then
xvfb-run pytest --cov=lddc --cov-report=xml --cov-report=html --disable-warnings
else
pytest --cov=lddc --cov-report=xml --cov-report=html --disable-warnings
fi
- name: Save test artifacts
if: always()
Expand All @@ -73,5 +73,5 @@ jobs:
uses: actions/upload-artifact@v3
if: always()
with:
name: artifacts
name: artifacts-${{ matrix.os }}
path: tests/artifacts

0 comments on commit 7e1e43a

Please sign in to comment.