Skip to content

Commit

Permalink
MAINT: Fix tests (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Jun 18, 2024
1 parent be3f590 commit 69b479f
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 46 deletions.
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
actions:
patterns:
- "*"
labels:
- "github-actions"
- "dependabot"
5 changes: 5 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
changelog:
exclude:
authors:
- dependabot
- pre-commit-ci
52 changes: 21 additions & 31 deletions .github/workflows/local.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Local Testing

on:
on: # yamllint disable-line rule:truthy
pull_request:
workflow_dispatch:
schedule:
Expand All @@ -16,53 +16,43 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-2019, windows-2022]
os: [macos-14, macos-13, ubuntu-latest, ubuntu-20.04, windows-2019, windows-2022]
qt: [""]
include:
- os: ubuntu-latest
qt: "pyqt5"
- os: ubuntu-latest
qt: "pyqt6"
- os: ubuntu-latest
qt: "pyside6"
- os: ubuntu-latest
qt: "pyqt5"
- os: ubuntu-latest
qt: "pyqt6"
- os: ubuntu-latest
qt: "pyside6"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2

- uses: actions/checkout@v4
- name: Test Action
uses: ./
with:
qt: ${{ matrix.qt != '' }}

- name: Setup Python
uses: actions/setup-python@v1
- uses: actions/setup-python@v5
with:
python-version: "3.9"

- name: Install PyVista
run: pip install pyvista

- name: Test PyVista
run: python tests/test_pyvista.py

- uses: actions/upload-artifact@v2
python-version: "3.12"
- run: pip install pyvista
- run: python tests/test_pyvista.py
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-sphere
name: ${{ matrix.os }}-${{ matrix.qt }}-sphere
path: sphere.png

if-no-files-found: error
- name: Second test of PyVista
run: python -c "import pyvista;pyvista.Cube().plot(screenshot='${{ matrix.os }}-cube.png')"

run: python -c "import pyvista;pyvista.Cube().plot(screenshot='${{ matrix.os }}-${{ matrix.qt }}-cube.png')"
- name: Test Qt
if: matrix.qt != ''
run: |
set -eo pipefail
pip install ${{ matrix.qt }} matplotlib
QT_DEBUG_PLUGINS=1 LIBGL_DEBUG=verbose python tests/test_qt.py
shell: bash

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: cube
path: ${{ matrix.os }}-cube.png
name: ${{ matrix.os }}-${{ matrix.qt }}-cube
path: ${{ matrix.os }}-${{ matrix.qt }}-cube.png
if-no-files-found: error
24 changes: 9 additions & 15 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Test v1 release

on:
on: # yamllint disable-line rule:truthy
workflow_dispatch:
schedule:
- cron: "0 4 1 * *"
Expand All @@ -9,24 +9,18 @@ jobs:
test:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
os: [macos-14, macos-13, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Setup headless display
uses: pyvista/setup-headless-display-action@v1

- name: Setup Python
uses: actions/setup-python@v1
- uses: pyvista/setup-headless-display-action@v1
- uses: actions/setup-python@v5
with:
python-version: 3.9

- name: Install PyVista
run: pip install pyvista

python-version: 3.12
- run: pip install pyvista
- name: Use PyVista
run: python -c "import pyvista;pyvista.Sphere().plot(screenshot='${{ matrix.os }}-sphere.png')"

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: sphere
name: ${{ matrix.os }}-sphere
path: ${{ matrix.os }}-sphere.png
if-no-files-found: error
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
repos:
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
hooks:
- id: yamllint
args: [--strict, -c, .yamllint.yml]
5 changes: 5 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
extends: default

rules:
line-length: disable
document-start: disable

0 comments on commit 69b479f

Please sign in to comment.