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 GitHub Actions workflow #116

Merged
merged 2 commits into from
May 15, 2024
Merged

Conversation

JN-Hernandez
Copy link
Contributor

@JN-Hernandez JN-Hernandez commented May 15, 2024

Overview

This is the first stage of migrating CI to GitHub Actions. The goal for the CI overall is to compile scala via the update script and run the test script upon merge to develop. Eventually this will integrate with a GitFlow release process.

Connects #97

Demo

Notes

  • The server script, when run on its own, will run indefinitely within CI if not ran as a background process. Simply running the script with an & appended at the end will still produce output, which prevents it from running as a background process: instead, it would be a suspended background process. Redirecting output and error to an output file (>gh_output.txt 2>&1) allows for it to correctly run as a background process but then raises the issue of not providing insights into possible failures. Line 9 of the citest script can be uncommented in order to review the output/errors of running the server script.
  • As AWS login is needed for the server script to run successfully, repository secrets for AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_REGION have been created within the repo. These correspond to the AWS access key and secret access key for the github-actions AWS user. This information is stored in 1Password under the DataHub GitHub User Access entry.
  • CHANGELOG.md will be updated when ready to merge in order to prevent possible merge conflicts.

Testing Instructions

  • Create a test/* branch off of this branch and push up to GitHub; confirm GHA runs and completes successfully.
  • Create a initials/* branch off this branch and push up to GitHub; confirm GHA does NOT run.

This is the first stage of migrating CI to GitHub Actions.
The goal for the CI overall is to compile scala via the
update script and run the test script upon merge to
develop.  Eventually this will integrate wth a GitFlow
release process.
Copy link
Member

@rajadain rajadain left a comment

Choose a reason for hiding this comment

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

+1 tested, great work! Nice job figuring out how to properly run this in the background.

set -x

./scripts/server >gh_output.txt 2>&1 &
sleep 15
Copy link
Member

Choose a reason for hiding this comment

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

Consider adding a comment here along the lines of:

# Wait for server to start up before testing

@JN-Hernandez JN-Hernandez merged commit 134e31b into develop May 15, 2024
1 check passed
@JN-Hernandez JN-Hernandez deleted the jnh/travis-to-github-actions branch May 15, 2024 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants