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

Adjust CI workflow to disable Network Tests #159

Closed
wants to merge 8 commits into from

Conversation

michael-okeefe
Copy link
Collaborator

This PR addresses two issues:

  • disabling tests that require network access when in CI. These tests are disabled using an environment variable that is set within the workflow file.
  • fixes an issue where demo tests were not running when FASTSim is installed into a virtual environment

Michael O'Keefe and others added 7 commits September 20, 2024 14:36
Add line to set up Intel build to make universal python
wheels when building on M1 (Apple Silicon) macs.
This commit works off of an environmental variable called
'FASTSIM_DISABLE_NETWORK_TESTS'. If this variable is set
(regardless of the value), then networking tests will be
skipped. Within the code, the environment variable is
referenced via the constant NETWORK_TEST_DISABLE_ENV_VAR_NAME.

If 'FASTSIM_DISABLE_NETWORK_TESTS' is set, the test will print
to console and exit (i.e., it will show as passing). A user
will need to run `cargo test -- --nocapture` to see the print
statements that the test has been skipped.
The code to run the demo tests starts a subprocess.
However, that python version may not have the required
libraries installed if FASTSim had been installed to
a virtual environment. This change makes it such that we
use the current python executable to also run the demo
tests. If that executable doesn't resolve (empty string or
None), then we default to just "python" and hope it is on
the path (and set up with FASTSim).
@michael-okeefe michael-okeefe added bug Something isn't working enhancement New feature or request labels Oct 2, 2024
@michael-okeefe michael-okeefe self-assigned this Oct 2, 2024
Was missing from the tests.yaml file. Also fixed spacing issue.
@michael-okeefe michael-okeefe marked this pull request as ready for review October 2, 2024 21:15
@michael-okeefe michael-okeefe marked this pull request as draft October 2, 2024 21:38
@michael-okeefe michael-okeefe deleted the f2/update-ci-workflow branch October 2, 2024 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants