Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add integration test with napari #65

Merged
merged 3 commits into from
May 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,36 @@ on:
push:
branches:
- main
- npe2
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
branches:
- main
- npe2
workflow_dispatch:

jobs:
validate:
name: validate with npe2
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .

- name: Validate with npe2
run: npe2 validate napari-metadata

test:
needs: [validate]
name: ${{ matrix.platform }} py${{ matrix.python-version }}
runs-on: ${{ matrix.platform }}
strategy:
Expand Down
7 changes: 7 additions & 0 deletions src/napari_metadata/_tests/test_napari.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from napari_metadata._widget import MetadataWidget


def test_add_widget_to_napari(make_napari_viewer):
viewer = make_napari_viewer()
_, widget = viewer.window.add_plugin_dock_widget("napari-metadata")
assert isinstance(widget, MetadataWidget)