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

Replace GabrielBB/xvfb-action #5478

Merged
merged 1 commit into from
Jan 20, 2023

Conversation

aganders3
Copy link
Contributor

This (potentially) closes #5476 by replacing https://github.com/GabrielBB/xvfb-action with https://github.com/aganders3/headless-gui.

I am also happy to move this action into the napari org if the community prefers to maintain it collectively.

The purpose of this action is to run the same commands on multiple platforms (Windows, macOS, Linux) for consistency, but Linux requires a bit of extra setup:

Adding the WM startup in here also removes the need for the linux_wm test fixture added in #5208.

Other options:

  • Put more logic into the GitHub Actions Workflow file(s) to install dependencies and modify commands for Linux
  • (Maybe?) put more logic into tox.ini and other cross-platform command runners
  • Use another existing action e.g. https://github.com/coactions/setup-xvfb

As part of testing I also added a pre-commit hook to check GitHub Actions Workflows against a schema. I am happy to remove this or put it in a separate PR if it's muddying the scope here.

Type of change

  • Bug-fix/CI change

References

How has this been tested?

  • PR tests pass with this change in my fork

@github-actions github-actions bot added qt Relates to qt task tests Something related to our tests labels Jan 14, 2023
@codecov
Copy link

codecov bot commented Jan 14, 2023

Codecov Report

Merging #5478 (d4b5f71) into main (54c1dbf) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #5478      +/-   ##
==========================================
+ Coverage   89.30%   89.32%   +0.02%     
==========================================
  Files         600      600              
  Lines       51030    51010      -20     
==========================================
- Hits        45570    45564       -6     
+ Misses       5460     5446      -14     
Impacted Files Coverage Δ
napari/utils/_testsupport.py 63.84% <ø> (+1.17%) ⬆️
napari/_qt/_tests/test_qt_viewer.py 94.57% <100.00%> (ø)
napari/_qt/dialogs/qt_package_installer.py 81.67% <0.00%> (+0.39%) ⬆️
napari/utils/theme.py 92.89% <0.00%> (+0.59%) ⬆️
napari/utils/info.py 81.44% <0.00%> (+1.03%) ⬆️
napari/_qt/__init__.py 56.66% <0.00%> (+6.66%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@aganders3 aganders3 changed the title Remove xvfb-action and linux_wm test fixture in favor of aganders3/he… Replace GabrielBB/xvfb-action Jan 14, 2023
Copy link
Collaborator

@Czaki Czaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alisterburt
Copy link
Contributor

looks good to me and runs well (I tested in another project)!
I don't know if we want to maintain this in the napari org but think we should merge here - will merge given there are two approvals

@alisterburt alisterburt merged commit 42f0e7f into napari:main Jan 20, 2023
@aganders3 aganders3 deleted the new-headless-gui-action branch January 20, 2023 16:31
alisterburt pushed a commit to napari/docs that referenced this pull request Jan 20, 2023
# Description
<!-- What does this pull request (PR) do? Why is it necessary? -->
<!-- Tell us about your new content, improvement, or fix! -->
<!-- If you can, please add an image, or an animation "An image is worth
a thousand words!" -->
<!-- You can use https://www.cockos.com/licecap/ or similar to create
animations -->

following main repo napari/napari#5478

## Type of change
<!-- Please delete options that are not relevant. -->
- [ ] Fixes or improves existing content
- [ ] Adds new content page(s)
- [x] Fixes or improves workflow, documentation build or deployment

# References
<!-- What resources, documentation, and guides were used in the creation
of this PR? -->
<!-- If this is a fix or otherwise resolves an issue, reference it here
with "closes #(issue)" -->

## Final checklist:
- [ ] My PR is the minimum possible work for the desired functionality
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added [alt text](https://webaim.org/techniques/alttext/) to
new images included in this PR
@imagesc-bot
Copy link

This pull request has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/request-for-update-of-gui-tests-gihub-workflows-for-napari-plugins/76196/1

@Czaki Czaki mentioned this pull request Jun 7, 2023
@Czaki Czaki added this to the 0.4.18 milestone Jun 13, 2023
@Czaki Czaki added maintenance PR with maintance changes, triaged-0.4.18 To mark PR that is triaged in 0.4.18 release process labels Jun 13, 2023
Czaki pushed a commit that referenced this pull request Jun 16, 2023
This (potentially) closes #5476 by replacing
https://github.com/GabrielBB/xvfb-action with
https://github.com/aganders3/headless-gui.

I am also happy to move this action into the napari org if the community
prefers to maintain it collectively.

The purpose of this action is to run the same commands on multiple
platforms (Windows, macOS, Linux) for consistency, but Linux requires a
bit of extra setup:
* For GUI tests we need a display server, so we run
[Xvfb](https://en.wikipedia.org/wiki/Xvfb)
* [Some GUI tests additionally require a window
manager](https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#xvfb-assertionerror-timeouterror-when-using-waituntil-waitexposed-and-ui-events),
so this runs [herbstluftwm](https://herbstluftwm.org/) (though this is
configurable)

Adding the WM startup in here also removes the need for the `linux_wm`
test fixture added in #5208.

Other options:
* Put more logic into the GitHub Actions Workflow file(s) to install
dependencies and modify commands for Linux
* (Maybe?) put more logic into `tox.ini` and other cross-platform
command runners
* Use another existing action e.g.
https://github.com/coactions/setup-xvfb

As part of testing I also added a pre-commit hook to check GitHub
Actions Workflows against a schema. I am happy to remove this or put it
in a separate PR if it's muddying the scope here.

## Type of change
- [x] Bug-fix/CI change

# References
* Prior discussions:
  * #5208 (comment)
  * #5476 
* Old action currently in use: https://github.com/GabrielBB/xvfb-action
* New action proposed by this PR:
https://github.com/aganders3/headless-gui

# How has this been tested?
- [x] PR tests pass with this change in my fork
Czaki pushed a commit that referenced this pull request Jun 17, 2023
This (potentially) closes #5476 by replacing
https://github.com/GabrielBB/xvfb-action with
https://github.com/aganders3/headless-gui.

I am also happy to move this action into the napari org if the community
prefers to maintain it collectively.

The purpose of this action is to run the same commands on multiple
platforms (Windows, macOS, Linux) for consistency, but Linux requires a
bit of extra setup:
* For GUI tests we need a display server, so we run
[Xvfb](https://en.wikipedia.org/wiki/Xvfb)
* [Some GUI tests additionally require a window
manager](https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#xvfb-assertionerror-timeouterror-when-using-waituntil-waitexposed-and-ui-events),
so this runs [herbstluftwm](https://herbstluftwm.org/) (though this is
configurable)

Adding the WM startup in here also removes the need for the `linux_wm`
test fixture added in #5208.

Other options:
* Put more logic into the GitHub Actions Workflow file(s) to install
dependencies and modify commands for Linux
* (Maybe?) put more logic into `tox.ini` and other cross-platform
command runners
* Use another existing action e.g.
https://github.com/coactions/setup-xvfb

As part of testing I also added a pre-commit hook to check GitHub
Actions Workflows against a schema. I am happy to remove this or put it
in a separate PR if it's muddying the scope here.

## Type of change
- [x] Bug-fix/CI change

# References
* Prior discussions:
  * #5208 (comment)
  * #5476 
* Old action currently in use: https://github.com/GabrielBB/xvfb-action
* New action proposed by this PR:
https://github.com/aganders3/headless-gui

# How has this been tested?
- [x] PR tests pass with this change in my fork
Czaki pushed a commit that referenced this pull request Jun 18, 2023
This (potentially) closes #5476 by replacing
https://github.com/GabrielBB/xvfb-action with
https://github.com/aganders3/headless-gui.

I am also happy to move this action into the napari org if the community
prefers to maintain it collectively.

The purpose of this action is to run the same commands on multiple
platforms (Windows, macOS, Linux) for consistency, but Linux requires a
bit of extra setup:
* For GUI tests we need a display server, so we run
[Xvfb](https://en.wikipedia.org/wiki/Xvfb)
* [Some GUI tests additionally require a window
manager](https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#xvfb-assertionerror-timeouterror-when-using-waituntil-waitexposed-and-ui-events),
so this runs [herbstluftwm](https://herbstluftwm.org/) (though this is
configurable)

Adding the WM startup in here also removes the need for the `linux_wm`
test fixture added in #5208.

Other options:
* Put more logic into the GitHub Actions Workflow file(s) to install
dependencies and modify commands for Linux
* (Maybe?) put more logic into `tox.ini` and other cross-platform
command runners
* Use another existing action e.g.
https://github.com/coactions/setup-xvfb

As part of testing I also added a pre-commit hook to check GitHub
Actions Workflows against a schema. I am happy to remove this or put it
in a separate PR if it's muddying the scope here.

## Type of change
- [x] Bug-fix/CI change

# References
* Prior discussions:
  * #5208 (comment)
  * #5476 
* Old action currently in use: https://github.com/GabrielBB/xvfb-action
* New action proposed by this PR:
https://github.com/aganders3/headless-gui

# How has this been tested?
- [x] PR tests pass with this change in my fork
Czaki pushed a commit that referenced this pull request Jun 19, 2023
This (potentially) closes #5476 by replacing
https://github.com/GabrielBB/xvfb-action with
https://github.com/aganders3/headless-gui.

I am also happy to move this action into the napari org if the community
prefers to maintain it collectively.

The purpose of this action is to run the same commands on multiple
platforms (Windows, macOS, Linux) for consistency, but Linux requires a
bit of extra setup:
* For GUI tests we need a display server, so we run
[Xvfb](https://en.wikipedia.org/wiki/Xvfb)
* [Some GUI tests additionally require a window
manager](https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#xvfb-assertionerror-timeouterror-when-using-waituntil-waitexposed-and-ui-events),
so this runs [herbstluftwm](https://herbstluftwm.org/) (though this is
configurable)

Adding the WM startup in here also removes the need for the `linux_wm`
test fixture added in #5208.

Other options:
* Put more logic into the GitHub Actions Workflow file(s) to install
dependencies and modify commands for Linux
* (Maybe?) put more logic into `tox.ini` and other cross-platform
command runners
* Use another existing action e.g.
https://github.com/coactions/setup-xvfb

As part of testing I also added a pre-commit hook to check GitHub
Actions Workflows against a schema. I am happy to remove this or put it
in a separate PR if it's muddying the scope here.

## Type of change
- [x] Bug-fix/CI change

# References
* Prior discussions:
  * #5208 (comment)
  * #5476 
* Old action currently in use: https://github.com/GabrielBB/xvfb-action
* New action proposed by this PR:
https://github.com/aganders3/headless-gui

# How has this been tested?
- [x] PR tests pass with this change in my fork
Czaki pushed a commit that referenced this pull request Jun 21, 2023
This (potentially) closes #5476 by replacing
https://github.com/GabrielBB/xvfb-action with
https://github.com/aganders3/headless-gui.

I am also happy to move this action into the napari org if the community
prefers to maintain it collectively.

The purpose of this action is to run the same commands on multiple
platforms (Windows, macOS, Linux) for consistency, but Linux requires a
bit of extra setup:
* For GUI tests we need a display server, so we run
[Xvfb](https://en.wikipedia.org/wiki/Xvfb)
* [Some GUI tests additionally require a window
manager](https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#xvfb-assertionerror-timeouterror-when-using-waituntil-waitexposed-and-ui-events),
so this runs [herbstluftwm](https://herbstluftwm.org/) (though this is
configurable)

Adding the WM startup in here also removes the need for the `linux_wm`
test fixture added in #5208.

Other options:
* Put more logic into the GitHub Actions Workflow file(s) to install
dependencies and modify commands for Linux
* (Maybe?) put more logic into `tox.ini` and other cross-platform
command runners
* Use another existing action e.g.
https://github.com/coactions/setup-xvfb

As part of testing I also added a pre-commit hook to check GitHub
Actions Workflows against a schema. I am happy to remove this or put it
in a separate PR if it's muddying the scope here.

## Type of change
- [x] Bug-fix/CI change

# References
* Prior discussions:
  * #5208 (comment)
  * #5476 
* Old action currently in use: https://github.com/GabrielBB/xvfb-action
* New action proposed by this PR:
https://github.com/aganders3/headless-gui

# How has this been tested?
- [x] PR tests pass with this change in my fork
Czaki pushed a commit that referenced this pull request Jun 21, 2023
This (potentially) closes #5476 by replacing
https://github.com/GabrielBB/xvfb-action with
https://github.com/aganders3/headless-gui.

I am also happy to move this action into the napari org if the community
prefers to maintain it collectively.

The purpose of this action is to run the same commands on multiple
platforms (Windows, macOS, Linux) for consistency, but Linux requires a
bit of extra setup:
* For GUI tests we need a display server, so we run
[Xvfb](https://en.wikipedia.org/wiki/Xvfb)
* [Some GUI tests additionally require a window
manager](https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#xvfb-assertionerror-timeouterror-when-using-waituntil-waitexposed-and-ui-events),
so this runs [herbstluftwm](https://herbstluftwm.org/) (though this is
configurable)

Adding the WM startup in here also removes the need for the `linux_wm`
test fixture added in #5208.

Other options:
* Put more logic into the GitHub Actions Workflow file(s) to install
dependencies and modify commands for Linux
* (Maybe?) put more logic into `tox.ini` and other cross-platform
command runners
* Use another existing action e.g.
https://github.com/coactions/setup-xvfb

As part of testing I also added a pre-commit hook to check GitHub
Actions Workflows against a schema. I am happy to remove this or put it
in a separate PR if it's muddying the scope here.

## Type of change
- [x] Bug-fix/CI change

# References
* Prior discussions:
  * #5208 (comment)
  * #5476 
* Old action currently in use: https://github.com/GabrielBB/xvfb-action
* New action proposed by this PR:
https://github.com/aganders3/headless-gui

# How has this been tested?
- [x] PR tests pass with this change in my fork
Czaki pushed a commit that referenced this pull request Jun 21, 2023
This (potentially) closes #5476 by replacing
https://github.com/GabrielBB/xvfb-action with
https://github.com/aganders3/headless-gui.

I am also happy to move this action into the napari org if the community
prefers to maintain it collectively.

The purpose of this action is to run the same commands on multiple
platforms (Windows, macOS, Linux) for consistency, but Linux requires a
bit of extra setup:
* For GUI tests we need a display server, so we run
[Xvfb](https://en.wikipedia.org/wiki/Xvfb)
* [Some GUI tests additionally require a window
manager](https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#xvfb-assertionerror-timeouterror-when-using-waituntil-waitexposed-and-ui-events),
so this runs [herbstluftwm](https://herbstluftwm.org/) (though this is
configurable)

Adding the WM startup in here also removes the need for the `linux_wm`
test fixture added in #5208.

Other options:
* Put more logic into the GitHub Actions Workflow file(s) to install
dependencies and modify commands for Linux
* (Maybe?) put more logic into `tox.ini` and other cross-platform
command runners
* Use another existing action e.g.
https://github.com/coactions/setup-xvfb

As part of testing I also added a pre-commit hook to check GitHub
Actions Workflows against a schema. I am happy to remove this or put it
in a separate PR if it's muddying the scope here.

## Type of change
- [x] Bug-fix/CI change

# References
* Prior discussions:
  * #5208 (comment)
  * #5476 
* Old action currently in use: https://github.com/GabrielBB/xvfb-action
* New action proposed by this PR:
https://github.com/aganders3/headless-gui

# How has this been tested?
- [x] PR tests pass with this change in my fork
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance PR with maintance changes, qt Relates to qt task tests Something related to our tests triaged-0.4.18 To mark PR that is triaged in 0.4.18 release process
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace GabrielBB/xvfb-action with something that will work after node 12 removal from GHA runners
5 participants