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 CI + fix tests #53

Closed
wants to merge 1 commit into from
Closed

Add CI + fix tests #53

wants to merge 1 commit into from

Conversation

jonahgeorge
Copy link

@jonahgeorge jonahgeorge commented Aug 22, 2023

Partially fixes #43

In attempting to run the Python unittest suite I discovered that it fails on Linux VMs; however, passes successfully on Darwin. This is a first draft to at least run this integration suite for each commit.

An example of it successfully passing can be seen in my fork:
https://github.com/jonahgeorge/single-beat/actions/runs/5943457084/job/16118643020

Future Improvements:

  • Run a matrix of Python versions, 3.7+
  • Run the unittest suite

second_single_beat.log \
third_single_beat.log

(SINGLE_BEAT_REDIS_SERVER='redis://localhost:6379/9' SINGLE_BEAT_LOG_LEVEL=debug SINGLE_BEAT_IDENTIFIER='test-beat' python ../singlebeat/beat.py sh -c 'exec python long_waiting_process.py > first_single_beat.log') &
Copy link
Author

Choose a reason for hiding this comment

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

We must move the redirection into the command passed to single-beat so that the subprocess can flush its output. See #28

f = open(fname)
if "hello - " in f.read():
hello_cnt += 1
except OSError:
Copy link
Author

Choose a reason for hiding this comment

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

As the subprocess in test-single-beat.sh now handles the file redirection, the output for the processes which are not the leader will not create log files.

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.

Setup CI
1 participant