Skip to content

Warning

You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?

setup-headless-display-action

Actions
Setup a headless display on Linux and Windows
v0.1.0
Star (22)

📺 Setup Headless Display Action

Setup a headless display on Linux and Windows (not needed on MacOS)

🚀 Usage

name: Tests that require virtual display

on:
  pull_request:
  workflow_dispatch:
  push:
    tags:
      - "*"
    branches:
      - main

jobs:
  test:
    strategy:
      matrix:
        os: [macos-latest, ubuntu-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - name: Setup headless Display
        uses: pyvista/[email protected]

🖼️ PyVista Example

name: Workflow that uses PyVista for plotting

on:
  pull_request:
  workflow_dispatch:
  push:
    tags:
      - "*"
    branches:
      - main

jobs:
  test:
    strategy:
      matrix:
        os: [macos-latest, ubuntu-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Setup headless Display
        uses: pyvista/[email protected]

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

      - name: Install PyVista
        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
        with:
          name: sphere
          path: ${{ matrix.os }}-sphere.png

setup-headless-display-action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Setup a headless display on Linux and Windows
v0.1.0

setup-headless-display-action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.