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

Dockerfile Smoke Tests #116

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Conversation

cbrinson-rise8
Copy link
Collaborator

@cbrinson-rise8 cbrinson-rise8 commented Nov 4, 2024

Description

Create a new CI workflow that runs a smoke test job when a PR is open.

Related Issues

closes #103

Additional Notes

The smoke test should roughly do the following, but more steps can be added if identified during the development process

  • start up a database
  • build the Dockerfile
  • run the RL service on the docker container
  • send a series (~4 or so) of curl requests to the /link endpoint, and verify results

<--------------------- REMOVE THE LINES BELOW BEFORE MERGING --------------------->

Checklist

Please review and complete the following checklist before submitting your pull request:

  • I have ensured that the pull request is of a manageable size, allowing it to be reviewed within a single session.
  • I have reviewed my changes to ensure they are clear, concise, and well-documented.
  • I have updated the documentation, if applicable.
  • I have added or updated test cases to cover my changes, if applicable.
  • I have minimized the number of reviewers to include only those essential for the review.

Checklist for Reviewers

Please review and complete the following checklist during the review process:

  • The code follows best practices and conventions.
  • The changes implement the desired functionality or fix the reported issue.
  • The tests cover the new changes and pass successfully.
  • Any potential edge cases or error scenarios have been considered.

Copy link

codecov bot commented Nov 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.17%. Comparing base (f0944e3) to head (abd70ac).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #116   +/-   ##
=======================================
  Coverage   95.17%   95.17%           
=======================================
  Files          26       26           
  Lines        1284     1284           
=======================================
  Hits         1222     1222           
  Misses         62       62           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cbrinson-rise8 cbrinson-rise8 self-assigned this Nov 4, 2024
@cbrinson-rise8 cbrinson-rise8 added feature New feature or request automation Automation of processes labels Nov 4, 2024
@cbrinson-rise8 cbrinson-rise8 marked this pull request as ready for review November 5, 2024 18:16
sudo apt-get install -y docker-compose

- name: Start services with docker-compose
run: docker-compose up -d
Copy link
Collaborator

Choose a reason for hiding this comment

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

The compose.yml file is currently configured for development use, the main differences being it will run jaeger by default and override the default CMD to wrap the web server in an opentelemetry call. Neither of these will likely be used in production environments. Did you consider just using docker on its own to run the API? The only dependency would be a database like postgres.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah I could definitly change it to use that. No real reason I did it this way other than it was the first thing I thought of. I'll take a look at just using the dockerfile instead

-H "Content-Type: application/json")

echo "Response: $RESPONSE_1"
echo "$RESPONSE_1" | grep -q '"is_match":\s*false'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Cool use of grep. I believe jq is also available by default on ubuntu-latest if you wanted to use that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation Automation of processes feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dockerfile smoke tests
2 participants