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

Update CI Workflow to Skip Network Tests #160

Merged
merged 3 commits into from
Dec 5, 2024

Conversation

michael-okeefe
Copy link
Collaborator

This PR sets an environment variable in the CI to skip tests that require network access since the network unreliability on the CI can cause false positive failures.

This commit also addresses an issue where demo tests were not running when called from a venv that had FASTSim installed.

NOTE: there was a previous version of this PR that accidentally brought in the v2.1.3 changes as well. That was deleted and this one was made.

Michael O'Keefe added 3 commits October 2, 2024 15:43
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).
Was missing from the tests.yaml file. Also fixed spacing issue.
@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
@calbaker calbaker merged commit 3e39fee into fastsim-2 Dec 5, 2024
3 checks passed
@calbaker calbaker deleted the f2/update-ci-workflow-v2 branch December 5, 2024 21:13
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