From f3d6b97ee34ac39365b323cb510790d09880375e Mon Sep 17 00:00:00 2001 From: Alex Hinson Date: Thu, 4 Mar 2021 15:56:37 -0800 Subject: [PATCH 1/3] chore: add node auth tests to CircleCI --- .circleci/config.yml | 44 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2e138a68f2f..c1e01fd9fa7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -111,6 +111,26 @@ commands: - store_artifacts: path: ~/amplify-js-samples-staging/cypress/screenshots + integ_test_node_js: + parameters: + test_name: + type: string + category: + type: string + sample_name: + type: string + steps: + - run: + name: 'Install << parameters.test_name >> sample' + command: | + echo "Current NPM registry: " $(yarn config get registry) + ~/amplify-js/.circleci/retry-yarn-script.sh -s 'install' -n 3 + - run: + name: 'Run Node tests for << parameters.test_name >> sample' + command: | + cd ~/amplify-js-samples-staging + ~/amplify-js/.circleci/retry-yarn-script.sh -s 'ci:test node << parameters.category >> << parameters.sample_name >> dev' -n 3 + install_verdaccio: steps: - run: @@ -575,7 +595,7 @@ jobs: category: storage sample_name: storageComp spec: storage-comp - integ_amazon_cognito_identity_js: + integ_react_amazon_cognito_identity_js: parameters: browser: type: string @@ -591,7 +611,16 @@ jobs: sample_name: amazon-cognito-identity-js spec: amazon-cognito-identity-js browser: << parameters.browser >> - + integ_node_amazon_cognito_identity_js: + executor: js-test-executor + <<: *test_env_vars + working_directory: ~/amplify-js-samples-staging/samples/node/auth/amazon-cognito-identity-js + steps: + - prepare_test_env + - integ_test_node_js: + test_name: 'amazon-cognito-identity-js' + category: auth + sample_name: amazon-cognito-identity-js integ_rn_ios_storage: executor: macos-executor <<: *test_env_vars @@ -829,7 +858,7 @@ workflows: - build filters: <<: *releasable_branches - - integ_amazon_cognito_identity_js: + - integ_react_amazon_cognito_identity_js: requires: - integ_setup - build @@ -838,6 +867,12 @@ workflows: matrix: parameters: <<: *test_browsers + - integ_node_amazon_cognito_identity_js: + requires: + - integ_setup + - build + filters: + <<: *releasable_branches - integ_rn_ios_storage: requires: - integ_setup @@ -890,7 +925,8 @@ workflows: - integ_react_interactions - integ_angular_interactions - integ_vue_interactions - - integ_amazon_cognito_identity_js + - integ_react_amazon_cognito_identity_js + - integ_node_amazon_cognito_identity_js - integ_react_auth - integ_angular_auth - integ_vue_auth From d703476a61877e360540a4943293220a209d34c3 Mon Sep 17 00:00:00 2001 From: Alex Hinson Date: Tue, 9 Mar 2021 12:19:21 -0800 Subject: [PATCH 2/3] testing CCI --- .circleci/config.yml | 63 ++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c1e01fd9fa7..f358abbafdf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -730,6 +730,7 @@ releasable_branches: &releasable_branches - ui-components/main - 1.0-stable - native + - add-node-auth-to-cci test_browsers: &test_browsers browser: [chrome, firefox] @@ -912,34 +913,34 @@ workflows: matrix: parameters: <<: *datastore_auth_scenarios - - deploy: - filters: - <<: *releasable_branches - requires: - - unit_test - - integ_react_predictions - - integ_react_datastore - - integ_react_storage - - integ_react_storage_multipart_progress - - integ_react_storage_ui - - integ_react_interactions - - integ_angular_interactions - - integ_vue_interactions - - integ_react_amazon_cognito_identity_js - - integ_node_amazon_cognito_identity_js - - integ_react_auth - - integ_angular_auth - - integ_vue_auth - - integ_rn_ios_storage - - integ_rn_ios_storage_multipart_progress - - integ_rn_ios_push_notifications - - integ_rn_android_storage - - integ_rn_android_storage_multipart_progress - - integ_datastore_auth - - post_release: - filters: - branches: - only: - - release - requires: - - deploy + # - deploy: + # filters: + # <<: *releasable_branches + # requires: + # - unit_test + # - integ_react_predictions + # - integ_react_datastore + # - integ_react_storage + # - integ_react_storage_multipart_progress + # - integ_react_storage_ui + # - integ_react_interactions + # - integ_angular_interactions + # - integ_vue_interactions + # - integ_react_amazon_cognito_identity_js + # - integ_node_amazon_cognito_identity_js + # - integ_react_auth + # - integ_angular_auth + # - integ_vue_auth + # - integ_rn_ios_storage + # - integ_rn_ios_storage_multipart_progress + # - integ_rn_ios_push_notifications + # - integ_rn_android_storage + # - integ_rn_android_storage_multipart_progress + # - integ_datastore_auth + # - post_release: + # filters: + # branches: + # only: + # - release + # requires: + # - deploy From 38b99c70ad914c850a8f856844adf3b82523e8f7 Mon Sep 17 00:00:00 2001 From: Alex Hinson Date: Tue, 9 Mar 2021 12:34:37 -0800 Subject: [PATCH 3/3] revert testing --- .circleci/config.yml | 63 ++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f358abbafdf..c1e01fd9fa7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -730,7 +730,6 @@ releasable_branches: &releasable_branches - ui-components/main - 1.0-stable - native - - add-node-auth-to-cci test_browsers: &test_browsers browser: [chrome, firefox] @@ -913,34 +912,34 @@ workflows: matrix: parameters: <<: *datastore_auth_scenarios - # - deploy: - # filters: - # <<: *releasable_branches - # requires: - # - unit_test - # - integ_react_predictions - # - integ_react_datastore - # - integ_react_storage - # - integ_react_storage_multipart_progress - # - integ_react_storage_ui - # - integ_react_interactions - # - integ_angular_interactions - # - integ_vue_interactions - # - integ_react_amazon_cognito_identity_js - # - integ_node_amazon_cognito_identity_js - # - integ_react_auth - # - integ_angular_auth - # - integ_vue_auth - # - integ_rn_ios_storage - # - integ_rn_ios_storage_multipart_progress - # - integ_rn_ios_push_notifications - # - integ_rn_android_storage - # - integ_rn_android_storage_multipart_progress - # - integ_datastore_auth - # - post_release: - # filters: - # branches: - # only: - # - release - # requires: - # - deploy + - deploy: + filters: + <<: *releasable_branches + requires: + - unit_test + - integ_react_predictions + - integ_react_datastore + - integ_react_storage + - integ_react_storage_multipart_progress + - integ_react_storage_ui + - integ_react_interactions + - integ_angular_interactions + - integ_vue_interactions + - integ_react_amazon_cognito_identity_js + - integ_node_amazon_cognito_identity_js + - integ_react_auth + - integ_angular_auth + - integ_vue_auth + - integ_rn_ios_storage + - integ_rn_ios_storage_multipart_progress + - integ_rn_ios_push_notifications + - integ_rn_android_storage + - integ_rn_android_storage_multipart_progress + - integ_datastore_auth + - post_release: + filters: + branches: + only: + - release + requires: + - deploy