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

👷 [RUM-7634] Add deploy and source maps upload scripts tests #3211

Merged
merged 4 commits into from
Dec 16, 2024

Conversation

amortemousque
Copy link
Collaborator

@amortemousque amortemousque commented Dec 11, 2024

Motivation

Our deployment scripts have become increasingly complex, and the lack of tests makes further changes both challenging and prone to errors. This PR adds test for the CDN deployment script and the source maps upload script.

I’ve chosen to test the scripts by verifying their outputted commands rather than splitting the script and testing each function. I found this approach clearer, as it allows us to easily see the expected commands directly in the tests.

Changes

  • Adds tests deploy.spec.js and upload-source-maps.spec.js
  • Adapt eslint rules for script spec files

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@amortemousque amortemousque requested a review from a team as a code owner December 11, 2024 20:17
@amortemousque amortemousque force-pushed the aymeric/test-deploy-scripts branch from 61ae6e1 to 514ed35 Compare December 11, 2024 20:36
@amortemousque amortemousque changed the title 👷 [RUM-7634] Add deploy and upload source map tests 👷 [RUM-7634] Add deploy and source maps upload scripts tests Dec 11, 2024
@codecov-commenter
Copy link

codecov-commenter commented Dec 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.42%. Comparing base (17b3cbb) to head (522dea8).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3211      +/-   ##
==========================================
- Coverage   93.43%   93.42%   -0.02%     
==========================================
  Files         282      282              
  Lines        7721     7721              
  Branches     1732     1732              
==========================================
- Hits         7214     7213       -1     
- Misses        507      508       +1     

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

Copy link
Contributor

@sethfowler-datadog sethfowler-datadog left a comment

Choose a reason for hiding this comment

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

LGTM; this is a great addition!

scripts/deploy/deploy.spec.js Outdated Show resolved Hide resolved
@amortemousque amortemousque merged commit 770f830 into main Dec 16, 2024
21 checks passed
@amortemousque amortemousque deleted the aymeric/test-deploy-scripts branch December 16, 2024 17:14
@BenoitZugmeyer BenoitZugmeyer mentioned this pull request Jan 6, 2025
4 tasks
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.

4 participants