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

fix(integration tests): CircleCI workflows and Cypress integration testing #1071

Merged
merged 15 commits into from
Jun 26, 2018

Conversation

jordanranz
Copy link
Contributor

Description of changes:

CircleCI changes

  • Workflows added to CircleCI config for separating build, test, and deploy jobs
  • "deploy" job that publishes amplify only runs on master branch now
  • Cache saved from "build" job steps

Cypress Integration

  • Cypress testing framework added to root package.json
  • Cypress installed for aws-amplify-react package
  • withAuthenticator component integration testing with Cypress added

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor

@powerful23 powerful23 left a comment

Choose a reason for hiding this comment

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

👍

@mlabieniec mlabieniec changed the title CircleCI workflows and Cypress integration testing fix(integration tests): CircleCI workflows and Cypress integration testing Jun 21, 2018
Copy link
Contributor

@mlabieniec mlabieniec left a comment

Choose a reason for hiding this comment

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

👍

@@ -0,0 +1,4 @@
{
"baseUrl": "http://localhost:3000/",
"video": false
Copy link
Contributor

Choose a reason for hiding this comment

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

do we have the ability to create these and push them somewhere? Perhaps to S3 etc. This would be useful to see if any issues arise (eventually).

Copy link
Contributor

Choose a reason for hiding this comment

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

In that case should be a unique prefix, in case there are concurrent pr's

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After a little research I found that you can upload artifacts with CircleCI:
https://circleci.com/docs/2.0/artifacts/

looks like I can do this right in the circleci config:
https://github.com/cypress-io/cypress-example-docker-circle#artifacts

I can do this for now and we can create a task to look into uploading to an s3 bucket.

Copy link
Contributor

@manueliglesias manueliglesias left a comment

Choose a reason for hiding this comment

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

Looks good, I just want to confirm the publishing to @latest , see comment

git clone $AUTH_CLONE_URL
cd aws-amplify-cypress-auth
yarn
awsmobile configure aws $IAM_ACCESS_KEY $IAM_SECRET_KEY us-east-1
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the region be a env variable too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. I can make it an env variable.

filters:
branches:
only:
- master
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this happen on the release branch too? How are we going to publish to @latest ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. I can add the release branch here. Are there any other branches we should consider here?

@@ -0,0 +1,4 @@
{
"baseUrl": "http://localhost:3000/",
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we assume that the test will run only on one container? So yarn start wont block port 3000...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This baseUrl is the url that the cloned test package will run on. Parallel integration tests will run on separate containers, so there should be no blocking, however there would be blocking on the same container. Is this a problem? I may be confused with what you are asking.

Copy link
Contributor

@elorzafe elorzafe left a comment

Choose a reason for hiding this comment

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

Excelent!, for me is ok assuming that yarn start runs on an individual container

Copy link
Contributor

@manueliglesias manueliglesias left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@manueliglesias manueliglesias merged commit bfa4776 into aws-amplify:master Jun 26, 2018
@github-actions
Copy link

This pull request has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants