-
-
Notifications
You must be signed in to change notification settings - Fork 745
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
Enable ci-integration tests on GHA (incl fixing a few tests) #5202
Changes from 12 commits
f1126dc
3046d05
fbd09dd
204723c
349be7a
e290349
783335e
312efb4
f87e999
ac6fb79
b2b7917
3193858
28833ec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -359,6 +359,12 @@ def _get_action_instance(self): | |||||
|
||||||
stdin_data = sys.stdin.readline().strip() | ||||||
|
||||||
if not stdin_data: | ||||||
# This could indicate that parent process (e.g. process which runs the tests has | ||||||
# incorrectly opened the stdin and that one is then inherited by the process which is | ||||||
# spawning it which will cause issues) | ||||||
raise ValueError("Received no valid parameters data from sys.stdin") | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not a blocker, but noting this in the future: it would be a good idea to log what already has been read into
Suggested change
|
||||||
|
||||||
try: | ||||||
stdin_parameters = orjson.loads(stdin_data) | ||||||
stdin_parameters = stdin_parameters.get("parameters", {}) | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# bitnami/rabbitmq configuration file (gets merged with rabbitmq.conf) | ||
listeners.ssl.default = 5671 | ||
# /bitnami/conf is a directory mounted into the bitnami/rabbitmq container | ||
ssl_options.cacertfile = /bitnami/conf/ssl_certs/ca/ca_certificate_bundle.pem | ||
ssl_options.certfile = /bitnami/conf/ssl_certs/server/server_certificate.pem | ||
ssl_options.keyfile = /bitnami/conf/ssl_certs/server/private_key.pem | ||
ssl_options.verify = verify_peer | ||
ssl_options.fail_if_no_peer_cert = false | ||
|
||
# this is "insecure" but it doesn't matter for CI, and it simplifies integration test machinery | ||
loopback_users = none |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,9 @@ st2 --version | |
# Clean up old screen log files | ||
rm -f logs/screen-*.log | ||
|
||
# ::group::/::endgroup:: is helpful github actions syntax to fold this section. | ||
echo ::group::launchdev.sh start -x | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As per comment above since that script is now specific to gha, we should probably rename the directory and update the affected files :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not very difficult to make this work across multiple CI providers (like I did in ansible/molecule#2976 ), but I didn't see the point since this will only be running in GHA for now. As I don't want to disable Travis until after this PR is merged, I minimized my changes to the travis scripts. Once we disable travis, though, there's a lot of code on the chopping block. |
||
|
||
# start dev environment in screens | ||
./tools/launchdev.sh start -x | ||
|
||
|
@@ -28,6 +31,9 @@ echo " === START: Catting screen process log files. ===" | |
cat logs/screen-*.log | ||
echo " === END: Catting screen process log files. ===" | ||
|
||
# github actions: fold for launchdev.sh start -x | ||
echo ::endgroup:: | ||
|
||
# Setup the virtualenv for the examples pack which is required for orquesta integration tests. | ||
st2 run packs.setup_virtualenv packs=examples | ||
|
||
|
@@ -39,3 +45,6 @@ chmod 777 logs/* | |
# root needs to access write some lock files when creating virtualenvs | ||
# o=other; X=only set execute bit if user execute bit is set (eg on dirs) | ||
chmod -R o+rwX ./virtualenv/ | ||
# newer virtualenv versions are putting lock files under ~/.local | ||
# as this script runs with sudo, HOME is actually the CI user's home | ||
chmod -R o+rwX ${HOME}/.local/share/virtualenv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future I think it would be better to move that code in
scripts/ci/setup-rabbitmq.sh
or similar so we can also run shell check, etc on those files.