Conversation
added 2 commits
September 7, 2019 03:39
Outline approach initital test - ngrok on circle trigger ci yes its circle ci YML FFS
Adds a custom deployer to work with a circle config in an error handled manner, changed from credentials to environment vars so as not to have to commit details. Does not use Grunt in this implmentation Add some node Adds the theme check pre build Remove grunt make self contained remove pub folder Copy caches Indents Deps & Folders Add correct paths doofus Add Throws, and change to use the ord exclusively Test without pub include unzip and yes flags Worth a try Support file config changes Cleanup and test Correctly throw Build Number? Correct preview handling Remove trailing comma Command comment
Author
|
DONE: Need to add a teardown/theme delete task. |
Author
|
Now includes a teardown for the theme once tests are complete and a few other error handlers. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request for: PivotalTracker
Description
Add a CircleCI config which uses env vars for the config / credentials
To make this work it has two scripts that are in the folder circle_scripts the largest one is the deployer
Which spools up an express webserver and attaches an ngrok instance programmatically.
The second one checks if the theme is ready to be interacted with.
This forgoes the need for the credentials file to be passed in via Travis or other measures, and uses env vars set to circle these variables are:
SHOPIFY_URL - Shopify url
SHOPIFY_API_KEY - Shopify private app
SHOPIFY_API_PASSWORD - Shopify private app
NGROK_TOKEN - nrgok access token ( from ngrok online )
CYPRESS_PROJECT_ID - This will be used for recording get this from cypress
CYPRESS_RUN_KEY - The cypress run key
Test artifacts and run log will be visible on: https://dashboard.cypress.io
circle_scripts/deploy.js writes both an audit log and also writes a revised cypress.json
This forgoes the need for overwriting the cy.visit() command.
It also adds a preview param which then is passed into the example test which would fix the multiple visits in a file error which would be found when the url was not forced by the overide.
Left two comments int he commands, when Cypress.env is being called but is not available so they are never read.
Screenshots / Testing URLs / Theme URLs
Additional information (Optional)
This is opinionated and focused on granular build components, these are normally split out as workflow items set as dependents. This purely zips the theme, however the build steps could be added before that. This is a cut back example.
The build runs on the cypress orb which is boot strapped with cypress, as such potentially the bloat and load time of dependency installs could be forgone. At present they are pretty sluggish.