From 69b479ffc52878a63656a7b9c8f4b2cf8c337635 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Tue, 18 Jun 2024 11:31:05 -0400 Subject: [PATCH] MAINT: Fix tests (#15) --- .github/dependabot.yml | 13 ++++++++ .github/release.yml | 5 +++ .github/workflows/local.yml | 52 +++++++++++++------------------- .github/workflows/production.yml | 24 ++++++--------- .pre-commit-config.yaml | 6 ++++ .yamllint.yml | 5 +++ 6 files changed, 59 insertions(+), 46 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/release.yml create mode 100644 .pre-commit-config.yaml create mode 100644 .yamllint.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..18aff79 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + groups: + actions: + patterns: + - "*" + labels: + - "github-actions" + - "dependabot" diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..9d1e098 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,5 @@ +changelog: + exclude: + authors: + - dependabot + - pre-commit-ci diff --git a/.github/workflows/local.yml b/.github/workflows/local.yml index a3f5d79..67f964c 100644 --- a/.github/workflows/local.yml +++ b/.github/workflows/local.yml @@ -1,6 +1,6 @@ name: Local Testing -on: +on: # yamllint disable-line rule:truthy pull_request: workflow_dispatch: schedule: @@ -16,44 +16,34 @@ 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: | @@ -61,8 +51,8 @@ jobs: 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 diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index 924c88f..184edf3 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -1,6 +1,6 @@ name: Test v1 release -on: +on: # yamllint disable-line rule:truthy workflow_dispatch: schedule: - cron: "0 4 1 * *" @@ -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 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..09e9911 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,6 @@ +repos: + - repo: https://github.com/adrienverge/yamllint.git + rev: v1.35.1 + hooks: + - id: yamllint + args: [--strict, -c, .yamllint.yml] diff --git a/.yamllint.yml b/.yamllint.yml new file mode 100644 index 0000000..669c864 --- /dev/null +++ b/.yamllint.yml @@ -0,0 +1,5 @@ +extends: default + +rules: + line-length: disable + document-start: disable