npm run server
- build and run express server athttp://localhost:5050
npm run test
- run cypress testsnpm run dev
- webpack-dev-server athttp://localhost:5050
npm run cy:open
- open up the Cypress test runner
- Run
npm run dev
in the first window - Run
npm run cy:open
in the second window - Click on needed specs file to run
-
Open Semaphore CI build for the needed commit.
-
Navigate to the "Promotions" step and click on the "S3 deploy" button.
-
The deployment script will upload all versions of the script:
- For the
main
branch, versions will be uploaded to theavala-html-form-script
bucket. - For all other branches, versions will be uploaded to the
avala-test-html-form-script
bucket.
- For the
-
The script will be placed in the
os-custom-elements
folder within the respective bucket. -
After completion, your script will be accessible under:
cdn.formli.com
domain for themain
branch.avala-html-form-script.s3.us-east-2.amazonaws.com
for all other branches.
The following script versions will be uploaded:
-
os-custom-elements-v*.min.js
: These versions will be regularly updated and should be used for production. -
os-custom-elements.[checksum].js
: Unique versions identified by their checksum. -
os-custom-elements.[checksum].min.js
: Minified versions corresponding to the unique checksums.
-
In Semaphore CI, navigate to the "Promotions" section.
-
Check the logs for a line similar to the following:
if [ "$SEMAPHORE_GIT_BRANCH" = "main" ]; then
-
Note the build name from the subsequent line, which looks like:
upload: dist/os-forms-v1.min.js to s3://avala-html-form-script/elements/os-custom-elements-v1.min.js
-
Copy the script name and build URL. The script URL for this specific build will be:
-
For the
main
branch:https://cdn.formli.com/elements/os-custom-elements-v1.min.js
-
For other branches:
https://avala-test-html-form-script.s3.us-east-2.amazonaws.com/elements/os-custom-elements-v1.min.js
-