File: integration-tests.yml

package info (click to toggle)
python-pyvista 0.46.4-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 176,968 kB
  • sloc: python: 94,346; sh: 216; makefile: 70
file content (152 lines) | stat: -rw-r--r-- 4,862 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: Integration Tests

# zizmor ignore note: All caching for pushes to main should be disabled with the `USE_CACHE` env var
on: # zizmor: ignore[cache-poisoning]
  pull_request:
  workflow_dispatch:
  schedule:
    - cron: "0 4 * * *"
  push:
    tags:
      - "*"
    branches:
      - main

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

env:
  ALLOW_PLOTTING: true
  SHELLOPTS: "errexit:pipefail"
  USE_CACHE: ${{
    (
    (github.event_name == 'workflow_dispatch' && github.event.inputs.cache == 'true') ||
    (github.event_name == 'pull_request') ||
    (github.event_name == 'push')
    ) &&
    !startsWith(github.ref, 'refs/tags/v') &&
    !startsWith(github.ref, 'refs/heads/release/') &&
    !startsWith(github.ref, 'refs/heads/main')
    }}

permissions:
  id-token: none

jobs:
  # For now this is just MNE-Python, but others could be added
  mne:
    name: MNE-Python
    runs-on: ubuntu-22.04
    env:
      DISPLAY: ":99.0"
      MNE_LOGGING_LEVEL: "info"
    steps:
      - uses: actions/checkout@v4
        with:
          persist-credentials: false
      - uses: actions/setup-python@v5
        with:
          python-version: "3.13"
      - run: git clone --depth=1 https://github.com/mne-tools/mne-python.git --branch main --single-branch
      - run: ./mne-python/tools/setup_xvfb.sh
      - name: Install MNE dependencies
        run: pip install numpy scipy matplotlib nibabel "PyQt6-Qt6!=6.6.0,!=6.7.0" "PyQt6!=6.6.0" qtpy ipympl pytest pytest-cov pytest-harvest pytest-timeout sphinx-gallery nbformat nbclient imageio imageio-ffmpeg
      - name: Install PyVista
        run: pip install -ve . # pyvista
      - run: python -c "import pyvista; assert not pyvista.OFF_SCREEN, f'{pyvista.OFF_SCREEN=} should be False'"
        name: Ensure OFF_SCREEN is False
      - name: Install PyVistaQt main
        run: pip install -v git+https://github.com/pyvista/pyvistaqt.git
      - name: Install MNE
        run: pip install -ve . # mne
        working-directory: mne-python
      - name: MNE Info
        run: mne sys_info -p
        working-directory: mne-python
      - run: ./tools/get_testing_version.sh
        working-directory: mne-python
      - uses: actions/cache@v4
        if: env.USE_CACHE == 'true'
        with:
          key: ${{ env.TESTING_VERSION }}
          path: ~/mne_data
      - run: ./tools/github_actions_download.sh
        working-directory: mne-python
      - run: pytest mne/viz/_brain mne/viz/tests/test_3d.py mne/viz/backends
        working-directory: mne-python

  pyvistaqt:
    name: PyVistaQt
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v4
        with:
          persist-credentials: false
      - uses: actions/setup-python@v5
        with:
          python-version: "3.12"
      - run: git clone https://github.com/pyvista/pyvistaqt.git --single-branch
      - uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19
        with:
          qt: true
          pyvista: false
      - run: pip install -ve ./pyvistaqt -r ./pyvistaqt/requirements_test.txt "PyQt6-Qt6!=6.6.0,!=6.7.0" "PyQt6!=6.6.0"
      - run: pip install -ve .
      - run: pytest ./tests
        working-directory: pyvistaqt

  geovista:
    name: GeoVista
    runs-on: ubuntu-22.04
    defaults:
      run:
        shell: bash -l {0}
    env:
      CARTOPY_SHARE_DIR: ~/.local/share/cartopy
      GEOVISTA_POOCH_MUTE: true
    steps:
      - uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19
      - uses: actions/checkout@v4
        with:
          persist-credentials: false
      - uses: actions/setup-python@v5
        with:
          python-version: "3.13"
      - run: git clone https://github.com/bjlittle/geovista.git --single-branch
      - name: Install PyVista
        run: pip install -ve . # pyvista
      - name: Install GeoVista
        run: pip install -ve .[test,exam,cmap] # geovista
        working-directory: geovista
      - name: Download cartopy assets
        run: |
          mkdir -p ${CARTOPY_SHARE_DIR}
          cartopy_feature_download physical --output ${CARTOPY_SHARE_DIR} --no-warn
      - run: xvfb-run -a pytest
        working-directory: geovista

  trame:
    name: Trame
    runs-on: ubuntu-22.04
    defaults:
      run:
        shell: bash -l {0}
    steps:
      - uses: actions/checkout@v4
        with:
          persist-credentials: false
      - uses: actions/setup-python@v5
        with:
          python-version: "3.13"
      - name: Install PyVista
        run: |
          pip install --upgrade pip
          pip install -ve . --group test

      - name: Install requirements
        run: |
          pip install -r examples_trame/requirements.txt
      - name: Run examples
        working-directory: examples_trame
        run: pytest -v ./tests