-
Notifications
You must be signed in to change notification settings - Fork 10
153 lines (140 loc) · 4.54 KB
/
test_prereleases.yml
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
153
# An "early warning" cron job that will install dependencies
# with `pip install --pre` periodically to test for breakage
# (and open an issue if a test fails)
name: --pre Test
on:
push:
branches:
- master
- develop
schedule:
- cron: '0 */12 * * *' # every 12 hours
pull_request:
paths:
- '.github/workflows/test_prereleases.yml'
- 'pyproject.toml'
- 'requirements/pre_test_problematic_version.txt'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
download_data:
name: Download test data
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- shell: bash
run: bash build_utils/download_data.sh
- name: Upload test data
uses: actions/upload-artifact@v4
with:
name: test_data
path: test_data
retention-days: 5
test:
name: ${{ matrix.platform }} py${{ matrix.python }} --pre
runs-on: ${{ matrix.platform }}
needs: download_data
strategy:
fail-fast: false
matrix:
platform: [windows-2022, macos-12, ubuntu-22.04]
python: [3.9]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: 'pip'
cache-dependency-path: 'pyproject.toml'
- name: Install Windows OpenGL
if: runner.os == 'Windows'
run: |
git clone --depth 1 git://github.com/pyvista/gl-ci-helpers.git
powershell gl-ci-helpers/appveyor/install_opengl.ps1
if (Test-Path -Path "C:\Windows\system32\opengl32.dll" -PathType Leaf) {Exit 0} else {Exit 1}
shell: powershell
- uses: tlambert03/setup-qt-libs@v1
- name: Download test data
uses: actions/download-artifact@v4
with:
name: test_data
path: test_data
- name: Install dependencies
run: |
pip install --upgrade pip
pip install setuptools tox tox-gh-actions>=2.12.0
- name: Test with tox linux
# run tests using pip install --pre
uses: aganders3/headless-gui@v2
timeout-minutes: 60
with:
run: python -m tox -v --pre
env:
PLATFORM: ${{ matrix.platform }}
PYVISTA_OFF_SCREEN: True # required for opengl on windows
NAPARI: latest
BACKEND: PyQt5
PIP_CONSTRAINT: requirements/pre_test_problematic_version.txt
# If something goes wrong, we can open an issue in the repo
- name: Report Failures
if: ${{ failure() }}
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PLATFORM: ${{ matrix.platform }}
PYTHON: ${{ matrix.python }}
RUN_ID: ${{ github.run_id }}
TITLE: '[test-bot] pip install --pre is failing'
with:
filename: .github/TEST_FAIL_TEMPLATE.md
update_existing: true
pyinstaller:
name: "Test pyinstaller build"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python 3.11
with:
python-version: 3.11
- uses: tlambert03/setup-qt-libs@v1
- name: Install dependencies
run: |
pip install --upgrade pip
pip install pip-tools
- name: Compile and install PyInstaller requirements
run: |
pip-compile --upgrade -o requirements.txt pyproject.toml requirements/pre_test_problematic_version.txt --extra pyinstaller --pre
pip-sync
pip install .
- name: upload requirements
uses: actions/upload-artifact@v4
with:
name: requirements
path: requirements.txt
- name: Run PyInstaller
run: python build_utils/create_and_pack_executable.py
- name: Upload bundle
uses: actions/upload-artifact@v4
with:
name: bundle
path: dist2/
- name: Test bundle
uses: aganders3/headless-gui@v2
timeout-minutes: 60
with:
run: dist/PartSeg/PartSeg _test
# If something goes wrong, we can open an issue in the repo
- name: Report Failures
if: ${{ failure() }}
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PLATFORM: "linux"
PYTHON: "3.11"
RUN_ID: ${{ github.run_id }}
TITLE: '[test-bot] pyinstaller bundle --pre is failing'
with:
filename: .github/TEST_FAIL_TEMPLATE.md
update_existing: true