Skip to content

github-actions: adapt cypress test to new server code #880

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

Merged
merged 2 commits into from
Oct 21, 2022

Conversation

da-h
Copy link
Contributor

@da-h da-h commented Oct 20, 2022

Description

This PR adapts the cypress test workflow to the new server code (for future reference: #858).
Note that it removes the additional checks introduced in #858 (commit 1a34bb6) to have the test work across the different versions for the server (before and after refactoring).

(The test failed here because of a missing argument for test. It should have been if test -f "py/visdom/server.py" instead of if test "py/visdom/server.py". Nevertheless, the extra test-case here is not required anymore.)

How Has This Been Tested?

Tested on my own fork, see here

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code refactor or cleanup (changes to existing code for improved readability or performance)

Checklist:

  • I adapted the version number under py/visdom/VERSION according to Semantic Versioning
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@da-h da-h changed the title github: adapt cypress test to new server code github-actions: adapt cypress test to new server code Oct 20, 2022
@da-h
Copy link
Contributor Author

da-h commented Oct 20, 2022

Added a commit to let all tests use the visdom command instead of the "local" call python3 py/visdom/server.
(The ./github/actions/prepare/action.yml installs the packages anyways before any test.)

  • The former is what users actually would call.
    The benefit is that using this version for actual testing would automatically detect errors like in Not able to load latest visdom 0.2.2 module #878.
  • The latter is a bit problematic, because the new file structure uses absolute imports of the setup.py installed package visdom. I.e. running python3 py/visdom/server will not work if the code has not been installed.
    Note that this would not have been a problem for a "single-file" script.

@JackUrb
Copy link
Contributor

JackUrb commented Oct 21, 2022

Fair point - the single file script was able to avoid install, but too unwieldy to continue to maintain. I think the tradeoff is worthwhile.

@JackUrb JackUrb merged commit d97ffd6 into fossasia:master Oct 21, 2022
@da-h da-h deleted the adapt_cypress_test_to_new_server_code branch October 21, 2022 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants