-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* limit runs of azure pipelines, prepare to use feature_prepare branch before PR * remove requires.io from badge list * limit github test from feature branch * check if workflow works * fix path * try use new workflows in test of napari widgets * fix typo * fix napari widgets configuration * fix typo * list files * fix download artifact * move coverage to workflow * fix backend selection * fix naming * limit test run * update conda configuration * pin napari in tox
- Loading branch information
Showing
6 changed files
with
180 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
python_version: | ||
required: true | ||
type: string | ||
os: | ||
required: true | ||
type: string | ||
tox_args: | ||
required: false | ||
type: string | ||
default: "" | ||
napari: | ||
required: false | ||
type: string | ||
default: >- | ||
["None"] | ||
qt_backend: | ||
required: false | ||
type: string | ||
default: >- | ||
["PyQt5", "PySide2"] | ||
test_data: | ||
required: false | ||
type: boolean | ||
default: False | ||
coverage: | ||
required: false | ||
type: boolean | ||
default: False | ||
|
||
|
||
jobs: | ||
test: | ||
name: ${{ matrix.os }} py ${{ matrix.python_version }} ${{ matrix.napari }} ${{ matrix.qt_backend }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ${{fromJson(inputs.os)}} | ||
python_version: ${{fromJson(inputs.python_version)}} | ||
napari_version: ${{fromJson(inputs.napari)}} | ||
qt_backend: ${{fromJson(inputs.qt_backend)}} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
name: Install Python ${{ matrix.python_version }} | ||
with: | ||
python-version: ${{ matrix.python_version }} | ||
|
||
- name: Install ubuntu libraries | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 | ||
- 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} | ||
- name: Download test data | ||
if: ${{ inputs.test_data }} | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: test_data | ||
path: test_data | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install -r requirements/requirements_dev.txt tox-gh-actions | ||
- name: Test with tox | ||
# run tests using pip install --pre | ||
uses: GabrielBB/xvfb-action@v1 | ||
timeout-minutes: 60 | ||
with: | ||
run: python -m tox ${{ inputs.tox_args }} | ||
env: | ||
PYVISTA_OFF_SCREEN: True # required for opengl on windows | ||
NAPARI: ${{ matrix.napari_version }} | ||
BACKEND: ${{ matrix.qt_backend }} | ||
|
||
- uses: codecov/codecov-action@v1 | ||
if: ${{ inputs.coverage }} | ||
with: | ||
file: ./coverage.xml | ||
fail_ci_if_error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.