Skip to content

Commit

Permalink
chore: Main merge 2023 08 09 (#11763)
Browse files Browse the repository at this point in the history
* feat(data): add CCI config for GraphQL API optimistic UI E2E tests (#11585)

* chore: update size limit that is too tight (#11652)

* chore: update size limit that is too tight

* chore(prediction): update size limit after custom s3 client

* fix: duplicate entry in connection states (#11579)

Co-authored-by: Aaron S <94858815+stocaaro@users.noreply.github.com>
Co-authored-by: AllanZhengYP <zheallan@amazon.com>

* fix(api-rest): refactor ajax method to not relying on side effects (#11498)

* fix(api-rest): refactor ajax method to not relying on side effects

the previous Signer.sign() implementation not only returns signed
request, but also sets the signed headers to input request. The
recent refactor makes it side-effect-less.

However this change breaks RestClient.ajax() clock skew correction
which relies on the x-amz-date header set by signer to the input
request object to indicate the current client side time.

this fix resolves #11480

* chore: Enable automatic license checking (#11604)

* chore(release): Publish [ci skip]

 - @aws-amplify/analytics@6.4.1
 - @aws-amplify/api-graphql@3.4.5
 - @aws-amplify/api-rest@3.4.0
 - @aws-amplify/api@5.3.5
 - @aws-amplify/auth@5.5.5
 - aws-amplify@5.3.5
 - @aws-amplify/cache@5.1.5
 - @aws-amplify/core@5.7.0
 - @aws-amplify/datastore-storage-adapter@2.0.42
 - @aws-amplify/datastore@4.6.5
 - @aws-amplify/geo@2.2.0
 - @aws-amplify/interactions@5.2.5
 - @aws-amplify/notifications@1.5.0
 - @aws-amplify/predictions@5.4.5
 - @aws-amplify/pubsub@5.4.1
 - @aws-amplify/pushnotification@5.0.39
 - @aws-amplify/storage@5.8.0

* chore(release): update API docs [ci skip]

* chore: Move Storage TS dependency to `devDependencies` (#11666)

* chore: pin @smtihy/types to 1.1.0 to prevent build failure in TS3.8 (#11673)

chore: ping @smtihy/types to 1.1.0 to prevent build failure in TS3.8

This is ok because the AWS SDK and crypto dependencies have been pinned
already

* chore: remove smithy resolution (#11682)

* feat: custom user agent Geo changes for UI handoff (#11632)

* feat: custom user agent Storage changes for UI handoff (#11627)

* chore: move storage code to InternalStorage.ts

* chore: update class and module name to InternalStorage and update imports

* feat: add customUserAgentDetails param to public methods

* feat: add customUserAgentDetails to getProperties methods, fix cancel overload

* feat: make Storage extend internal storage and override public methods

* feat: export InternalStorage from internals scope

* feat: send user agent details from public copy api to service call

* fix: add missing storage action, fix other minor issues

* feat: add userAgentValue with received user agent details to AWSS3Provider options

* fix: send getproperties instead of copy from getproperties method

* test: update tests to handle new form of passing user agent

* Revert "test: update tests to handle new form of passing user agent"

This reverts commit 4bc7c48.

* fix: fix jumbled StorageActions

* test: update CustomUserAgent test

* test: remove storageAction param and asserts from test

* chore: increase bundle size limits

* chore: publish feature branch for testing

* Feat/custom user agent UI/inappmessaging (#11656)

* chore: copy InAppMessaging to InternalInAppMessaging

* feat: add customUserAgentDetails param to InternalInAppMessaging

* feat: make InAppMessaging extend InternalInAppMessaging

* feat: send sync userAgentDetails through to service call

* fix: add SyncMessages value to InAppMessagingAction

* chore: remove extra parameter from non-service-call functions

* fix: fix typo in InAppMessagingAction

* feat: send user agent details through identify user to service call

* chore: remove unused import

* feat: allow InAppMessaging to be configured independently of Notifications

* test: update tests for internal changes

* build: export InternalInAppMessaging from scoped path

* fix: resolve bundle size

* chore: bundle size settings

* chore: increase bundle size limits

* chore: fix typo

* fix: update references to type with typo

* Feat/custom user agent UI/geo (#11657)

* chore: copy Geo code into InternalGeo

* feat: add geo actions

* feat: add customUserAgentDetails to geo provider

* feat: add customUserAgentDetails to public api's and send to service calls

* feat: make Geo extend InternalGeo and override public API's

* build: export InternalGeo from scoped geo/internals path

* chore: increase bundle size limits

* chore: increase bundle size limits

* feat: add user agent param to action that was missed

* chore: update doc-strings with new param

* Revert "Merge branch 'feat/custom-user-agent-ui/main' into feat/custom-user-agent-ui/storage"

This reverts commit f0e8657, reversing
changes made to ec1ed1a.

* fix: remove userAgentValue from CommonStorageOptions

* feat: add userAgentValue param to StorageProvider and implement

* fix: update config type to param type at position

* test: update test class based on changes

* chore: add new param to jsdocs

* chore: update comment from LastParameter (now ConfigParameter)

* chore: add comment explaining StorageProviderApiOptionsIndexMap

* chore: increase bundle size limits

* fix: send userAgentValue through storage put and list

* chore: remove outdated TODO comment

* chore: increase bundle size limits

* feat: custom user agent InAppMessaging changes for UI handoff (#11639)

* chore: copy InAppMessaging to InternalInAppMessaging

* feat: add customUserAgentDetails param to InternalInAppMessaging

* feat: make InAppMessaging extend InternalInAppMessaging

* feat: send sync userAgentDetails through to service call

* fix: add SyncMessages value to InAppMessagingAction

* chore: remove extra parameter from non-service-call functions

* fix: fix typo in InAppMessagingAction

* feat: send user agent details through identify user to service call

* chore: remove unused import

* feat: allow InAppMessaging to be configured independently of Notifications

* test: update tests for internal changes

* build: export InternalInAppMessaging from scoped path

* fix: resolve bundle size

* chore: bundle size settings

* chore: increase bundle size limits

* chore: fix typo

* fix: update references to type with typo

* chore: update jsdocs in InternalInAppMessaging

* chore: increase bundle size limit

* chore: shorten jsdocs comment

* fix: first attempt to fix InAppMessaging internals

* fix: fix internals package.json paths

* test: fix import form internals

* chore: increase bundle size limits

* chore(release): Publish [ci skip]

 - @aws-amplify/analytics@6.5.0
 - @aws-amplify/api-graphql@3.4.6
 - @aws-amplify/api-rest@3.5.0
 - @aws-amplify/api@5.4.0
 - @aws-amplify/auth@5.6.0
 - aws-amplify@5.3.6
 - @aws-amplify/cache@5.1.6
 - @aws-amplify/core@5.8.0
 - @aws-amplify/datastore-storage-adapter@2.0.43
 - @aws-amplify/datastore@4.7.0
 - @aws-amplify/geo@2.3.0
 - @aws-amplify/interactions@5.2.6
 - @aws-amplify/notifications@1.6.0
 - @aws-amplify/predictions@5.5.0
 - @aws-amplify/pubsub@5.5.0
 - @aws-amplify/pushnotification@5.0.40
 - @aws-amplify/storage@5.9.0

* chore(release): update API docs [ci skip]

* chore: Migrate CI/CD to GitHub Actions (#11638)

* feat: Actions for pr testing (#12)

* feat: Add working e2e example (#14)

* chore: Add configurable e2e tests to GH workflows (#15)

* feat(e2e): add integ test runner and test

* fix(e2e): retain existing workflows

* fix(e2e): remove old e2e example

---------

Co-authored-by: Sridhar <ashwsrir@amazon.com>

* chore: add e2e browser auth tests (#16)

* chore: add e2e browser auth tests

* chore: code cleanup

---------

Co-authored-by: Sridhar <ashwsrir@amazon.com>

* chore: add e2e browser predictions interactions tests (#17)

* chore: add e2e integ_react_predictions

* chore: add browser e2e interactions

---------

Co-authored-by: Sridhar <ashwsrir@amazon.com>
Co-authored-by: Aaron S <94858815+stocaaro@users.noreply.github.com>

* chore: limit PR concurrency (#19)

* chore: add build_type and enable retry (#18)

* prod & dev

* -n 3

* turn off fail-fast

---------

Co-authored-by: Aaron S <94858815+stocaaro@users.noreply.github.com>

* chore: add e2e browser datastore tests (#20)

Co-authored-by: Sridhar <ashwsrir@amazon.com>

* chore: add e2e browser api,storage tests (#21)

Co-authored-by: Sridhar <ashwsrir@amazon.com>

* chore: fix single browser provided in integ-config (#22)

Co-authored-by: Sridhar <ashwsrir@amazon.com>

* chore: Run dev and prod on the same runner

* chore: Add detox testing (#26)

* Feat/GitHub actions/test ashwinkumar6 (#27)

* chore: Re-arrange integ test configurations and improve prebuild (#29)

* chore: Re-arrange integ test configurations and inprove preflight

* Fix is-preflight flag

* Change preflight to prebuild for consistencu

* Disable fast fail on unit tests

* feat: Change yaml load output pattern

* chore: fix e2e integ_datastore_auth_v2 test

* chore: disable playwright tests (#33)

Co-authored-by: Sridhar <ashwsrir@amazon.com>

* chore: add google env variables for e2e datastore tests (#35)

Co-authored-by: Sridhar <ashwsrir@amazon.com>

* chore: add support for uploading artifacts  (#34)

* chore: test upload artifacts

* chore: test uploading artifact

* chore: Detox fix and step cleanup

* chore: Increase detox time limit

* chore: Turn warn to ignore for upload artifact misses

* chore: Disable broken detox tests

* chore: Disable PN testing and remove datastore test not running in circle

* chore: e2e add configurable time_out and retry_count (#36)

Co-authored-by: Sridhar <ashwsrir@amazon.com>

* chore: Increase deviceTracking timeout

* chore: add deploy workflow (#37)

* chore: add deploy workflow

* chore: gh actions publish code clean up

---------

Co-authored-by: Sridhar <ashwsrir@amazon.com>

* chore: Model full CI/CD flow - improve preid release (#38)

* fix: Cache on the single yarn.lock instead of all

* fix: Sync with main

* chore: Revert to relative path use (#40)

* chore: Revert to relative path use

* fix: Remove path from workflows

* chore: Add post-release merge to main

* chore: Remove orphaned workflow files

* chore: e2e add integ_auth_test_cypress_no_ui test (#39)

* chore: e2e add integ_auth_test_cypress_no_ui test

* chore: code cleanup

---------

Co-authored-by: Sridhar <ashwsrir@amazon.com>

* chore: change github name and email

* chore: update yarn.log

* chore: move additional e2e commented tests (#43)

* chore: move additional e2e commented tests

* chore: add required permissions to script file

---------

Co-authored-by: Sridhar <ashwsrir@amazon.com>

* chore: e2e keep test_name same as CCI (#45)

* chore: e2e keep test_name same as CCI
* chore: e2e re-arrange integ config
---------
Co-authored-by: Sridhar <ashwsrir@amazon.com>

* chore: update actions typo

Co-authored-by: William Lee <43682783+wlee221@users.noreply.github.com>

* chore: update actions typo

Co-authored-by: William Lee <43682783+wlee221@users.noreply.github.com>

* chore: cleanup github_email and github_name (#46)

Co-authored-by: Sridhar <ashwsrir@amazon.com>

* chore: cleanup load verdaccio action (#47)

Co-authored-by: Sridhar <ashwsrir@amazon.com>

* chore: actions code cleanup (#48)

Co-authored-by: Sridhar <ashwsrir@amazon.com>

* chore: Remove unused actions and use env vars instead of injection in run commands (#49)

* chore: add retention period and timeout for cache (#50)

* chore: add retention period and timeout for cache

* chore: code cleanup

---------

Co-authored-by: Sridhar <ashwsrir@amazon.com>

* chore: Chanke js token name

* chore: Filter preid content

* chore: Move file names around and consume env vars

* fix: Rest bundle size increase

* chore: Compactify on syntax

* chore: dynamically fetch the repo_owner_name (#52)

* chore: dynamically fetch the repo_owner_name

* chore: code cleanup

---------

Co-authored-by: Sridhar <ashwsrir@amazon.com>

* chore: Configure staging to use corresponding branch name

* chore: Naming and cleanup

* chore: Naming and dependency workflow improvements

* chore: Fix vars use for gh user/email

* chore: run e2e Rollup + DataStore test on just chrome (#54)

Co-authored-by: Sridhar <ashwsrir@amazon.com>

* chore: Add preid protection (#57)

* chore: Only publish to npm from the aws-amplify org

* chore: add concurrency to push workflows (#56)

* chore: add concurrency to push workflows

* chore: code cleanup

---------

Co-authored-by: Sridhar <ashwsrir@amazon.com>

* chore: Prepare for merge to main

* chore: Fix circle build

* chore: Okay, this will fix circle!

* chore: Integrate license checking into pr check

* chore: Add github action static tests

* chore: Fix test command

* Update .github/actions/npm-publish/action.yml

Co-authored-by: Jim Blanchard <jim.l.blanchard@gmail.com>

* chore: Fix names and descriptions

---------

Co-authored-by: Ashwin Kumar <ashwinkumar2468@gmail.com>
Co-authored-by: Sridhar <ashwsrir@amazon.com>
Co-authored-by: Lucas Yingshyan Ku <99565133+yingku@users.noreply.github.com>
Co-authored-by: William Lee <43682783+wlee221@users.noreply.github.com>
Co-authored-by: Jim Blanchard <jim.l.blanchard@gmail.com>

* chore: Migrate from circle to github actions (#11714)

* chore: Disable RSC test for firefox (#11719)

* chore: Reintroduce circle without deploy/post-release steps (#11720)

* chore: Reintroduce circle without deploy/post-release steps

* chore: Fix yarn.lock issue

* chore: Update yarn.lock (#11725)

* chore: add canary tests (#11721)

* chore: add canary testing

---------

Co-authored-by: Aaron S <94858815+stocaaro@users.noreply.github.com>
Co-authored-by: Francisco Rodriguez <frodriguez.cs@gmail.com>

* fix: update on-schedule-canary-test.yml (#11733)

Update on-schedule-canary-test.yml

* chore: Remove jsdoc (#11731)

* chore: remove unused cypress (#11732)

* chore: update react-native version (#11734)

Co-authored-by: Sridhar <ashwsrir@amazon.com>

* feat: custom user agent InternalCognitoUser (#11709)

* chore: port code from CognitoUser and CognitoUserPool to internals

* chore: delete InternalCognitoUserPool - separate PR

* chore: update imports and class name

* feat: add userAgentValue param to cognito client api's

* feat: add userAgentValue param to InternalCognitoUser api's, pass to client

* feat: make CognitoUser extend InternalCognitoUser and override api's

* test: update tests to work with additional param, minor fix

* chore: clean up unused imports and const's

* feat: add missing userAgentValue param

* chore: add new param to documentation comments

* build: export InternalCognitoUser from internals scope

* fix: remove default from InternalCognitoUser to fix scoped export

* fix: fix typo causing signOut failure

* build: correct index.d.ts files with changes

* test: revert auth tests

* chore: increase bundle size limits

* chore: simplify InternalCognitoUser import

---------

Co-authored-by: israx <70438514+israx@users.noreply.github.com>

* chore: run canary everyday at 9am (#11735)

* chore: run canary everyday at 9am

* chore: code cleanup

Co-authored-by: Venkata Ramyasri Kota <34170013+kvramyasri7@users.noreply.github.com>

* chore: update canary cron to 9amPDT

* chore: code cleanup

---------

Co-authored-by: Sridhar <ashwsrir@amazon.com>
Co-authored-by: Venkata Ramyasri Kota <34170013+kvramyasri7@users.noreply.github.com>

* feat: custom user agent Auth changes for UI handoff (#11606)

* chore: copy Auth code to InternalAuth

* feat: add customUserAgentDetails param to InternalAuth methods

* feat: make AuthClass extend InternalAuthClass, override functions with extra param

* build: export auth internals from /internals scope

* fix: changes signUp back to method type instead of prop so Auth can extend the method

* chore: update auth lint settings to allow class arrow functions to end in semi-colon

* fix: add overloaded method signature back in - unrelated change

* test: fix auth tests by mocking InternalAuthClass instead of AuthClass

* chore: change arrow methods to normal functions

* fix: remove async from overridden async functions

* chore: increase bundle size limits

* fix: remove internalSignUp and fix rest attr with overload and any

* fix: remove internalSignUp and fix rest attr with overload and any

* chore: update jsdocs

* chore: increase bundle size limits

* chore: Added retries to unstable DataStore canaries (#11740)

* fix(notifications): ios module pod cannot be autolinked in RN version < 0.69 (#11751)

* chore: Remove eslint from `amazon-cognito-identity-js` (#11749)

* feat: custom user agent InternalCognitoUserPool (#11716)

* chore: port CognitoUserPool over to InternalCognitoUserPool

* chore: restore CognitoUserPool

* feat: add userAgentValue parameter to signUp

* feat: update class name and imports

* feat: make CognitoUserPool extend internal and override signUp

* feat: export InternalCognitoUserPool from internals index

* feat: send userAgentValue to client service call

* test: fix internalsIndex test

* build: export InternalCognitoUserPool from internals scope

* chore: update CognitoUserPool type to extend internal

* Apply suggestions from code review

Co-authored-by: Jim Blanchard <jim.l.blanchard@gmail.com>

* chore: remove unnecessary test on internals index

* chore: increase bundle size limit

---------

Co-authored-by: Jim Blanchard <jim.l.blanchard@gmail.com>
Co-authored-by: israx <70438514+israx@users.noreply.github.com>

* chore: Bump DataStore join unit test time limit (#11753)

* chore: Upgrade amazon-cognito-identity-json Webpack & other changes (#11746)

* fix: Remove cpx dependency from pubsub (#11752)

* chore: update increase run count for unstable integ tests (#11758)

Co-authored-by: Sridhar <ashwsrir@amazon.com>

* chore: bump commonmarker from 0.23.9 to 0.23.10 in /docs (#11754)

Bumps [commonmarker](https://github.com/gjtorikian/commonmarker) from 0.23.9 to 0.23.10.
- [Release notes](https://github.com/gjtorikian/commonmarker/releases)
- [Changelog](https://github.com/gjtorikian/commonmarker/blob/v0.23.10/CHANGELOG.md)
- [Commits](gjtorikian/commonmarker@v0.23.9...v0.23.10)

---
updated-dependencies:
- dependency-name: commonmarker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jim Blanchard <jim.l.blanchard@gmail.com>

* chore: Update `amazon-cognito-identity-js` to use Webpack 5 (#11757)

* fixed build issues; revert api-graphql package merge changes

* fixed bundle size limits, added empty test command to types package to keep lerna happy

* bundle size limits

* updated preid for api-v6

* fixed branch name for tagged release trigger

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: David McAfee <mcafd@amazon.com>
Co-authored-by: AllanZhengYP <zheallan@amazon.com>
Co-authored-by: takpen <131546291+takpen@users.noreply.github.com>
Co-authored-by: Aaron S <94858815+stocaaro@users.noreply.github.com>
Co-authored-by: Jim Blanchard <jim.l.blanchard@gmail.com>
Co-authored-by: aws-amplify-bot <aws@amazon.com>
Co-authored-by: israx <70438514+israx@users.noreply.github.com>
Co-authored-by: erinleigh90 <106691284+erinleigh90@users.noreply.github.com>
Co-authored-by: Ashwin Kumar <ashwinkumar2468@gmail.com>
Co-authored-by: Sridhar <ashwsrir@amazon.com>
Co-authored-by: Lucas Yingshyan Ku <99565133+yingku@users.noreply.github.com>
Co-authored-by: William Lee <43682783+wlee221@users.noreply.github.com>
Co-authored-by: Francisco Rodriguez <frodriguez.cs@gmail.com>
Co-authored-by: Hui Zhao <10602282+HuiSF@users.noreply.github.com>
Co-authored-by: Venkata Ramyasri Kota <34170013+kvramyasri7@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
17 people authored Aug 10, 2023
1 parent 98c172c commit 4b2dec5
Show file tree
Hide file tree
Showing 91 changed files with 25,679 additions and 4,889 deletions.
88 changes: 1 addition & 87 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -364,21 +364,14 @@ jobs:
- checkout
- run:
name: yarn install --non-interactive
# temporarily rename .yarnrc before installing so that we can generate a yarn.lock artifact
command: |
mv .yarnrc ._yarnrc
yarn
- run: yarn bootstrap
- run: yarn build
# storing yarn.lock as an artifact, so that we can quickly get a dependency diff
# with the last working build in the event that some upstream deps break the build in the future
- store_artifacts:
path: yarn.lock
- run:
name: delete lockfile after persisting
command: |
mv ._yarnrc .yarnrc
rm yarn.lock
- save_cache:
key: amplify-ssh-deps-{{ .Branch }}
paths:
Expand Down Expand Up @@ -1649,7 +1642,6 @@ releasable_branches: &releasable_branches
- release
- main
- next
- api-v6

# List of test browsers that are always used in every E2E test. Tests that aren't expected to interact with browser APIs
# should use `minimal_browser_list` to keep test execution time low.
Expand Down Expand Up @@ -2264,85 +2256,7 @@ workflows:
matrix:
parameters:
<<: *extended_browser_list
- deploy:
filters:
<<: *releasable_branches
requires:
- unit_test
- bundle_test
- integ_react_delete_user
- integ_react_predictions
- integ_react_datastore
- integ_react_datastore_v2
- integ_react_datastore_multi_auth_one_rule
- integ_react_datastore_multi_auth_one_rule_v2
- integ_react_datastore_multi_auth_two_rules
- integ_react_datastore_multi_auth_two_rules_v2
- integ_react_datastore_multi_auth_three_plus_rules
- integ_react_datastore_multi_auth_three_plus_rules_v2
- integ_react_datastore_subs_disabled
- integ_react_datastore_subs_disabled_v2
- integ_react_datastore_consecutive_saves
- integ_react_datastore_consecutive_saves_v2
# - integ_react_datastore_observe_query
# - integ_react_datastore_observe_query_v2
- integ_react_datastore_schema_drift
- integ_react_storage
- integ_react_storage_multipart_progress
- integ_react_storage_copy
- integ_react_interactions
- integ_angular_interactions
- integ_vue_interactions
- integ_react_amazon_cognito_identity_js_cookie_storage
- integ_react_amazon_cognito_identity_js
- integ_node_amazon_cognito_identity_js
- integ_react_auth_1
- integ_react_auth_2
- integ_angular_auth
# - integ_javascript_auth # TODO: enable it when CDN deployment is automated
- integ_vue_auth
- integ_next_auth
- integ_rn_ios_storage
- integ_rn_ios_storage_multipart_progress
# - integ_rn_android_storage_multipart_progress
- integ_rn_ios_push_notifications
- integ_rn_ios_device_tracking
# - integ_rn_android_storage
# - integ_rn_ios_datastore_sqlite_adapter
- integ_datastore_auth
- integ_datastore_auth_v2
# - integ_duplicate_packages
- integ_auth_test_cypress_no_ui
- integ_react_graphql_api
# - integ_javascript_geo # TODO: enable it when CDN deployment is automated
- integ_react_geo
- integ_next_datastore_owner_auth
- integ_react_datastore_custom_pk_unconnected_models
- integ_react_datastore_custom_pk_unconnected_models_webkit
- integ_react_datastore_custom_pk_has_one
- integ_react_datastore_custom_pk_has_many_many_to_many
- integ_react_datastore_background_process_manager
- integ_react_datastore_background_process_manager_webkit
- integ_react_datastore_related_models
- integ_react_iot_reconnect
- integ_react_api_reconnect
- integ_react_datastore_selective_sync
- integ_react_datastore_nested_predicate
- integ_next_datastore_13_basic
- integ_next_datastore_13_js
- integ_vite_datastore_basic_crud
- integ_rollup_datastore_basic_crud
- integ_vanilla_js_datastore_basic_crud
- integ_react_datastore_docs_examples
- integ_react_datastore_websocket_disruption
- integ_react_api_optimistic_ui
- post_release:
filters:
branches:
only:
- release
requires:
- deploy

# Scheduled smoke test workflow
# Jobs are pulled from the getting-started-smoke-test inline orb defined below
canaries:
Expand Down
50 changes: 50 additions & 0 deletions .github/actions/load-verdaccio-with-amplify-js/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Load Verdaccio with AmplifyJs
description: Turn on Verdaccio and load up all of the AmplifyJS build artifacts

runs:
using: 'composite'
steps:
- name: Start verdaccio
run: |
npx verdaccio@5.25.0 &
while ! nc -z localhost 4873; do
echo "Verdaccio not running yet"
sleep 1
done
# Run your commands after verdaccio is up and running
echo "Verdaccio is up and running, proceeding with the script..."
shell: bash
- name: Install and run npm-cli-login
shell: bash
env:
NPM_REGISTRY: http://localhost:4873/
NPM_USER: verdaccio
NPM_PASS: verdaccio
NPM_EMAIL: verdaccio@amplify.js
run: |
npm i -g npm-cli-adduser
npm-cli-adduser
sleep 1
- name: Configure registry and git
shell: bash
working-directory: ./amplify-js
env:
NPM_REGISTRY: http://localhost:4873/
NPM_USER: verdaccio
NPM_PASS: verdaccio
NPM_EMAIL: verdaccio@amplify.js
run: |
yarn config set registry $NPM_REGISTRY
npm set registry $NPM_REGISTRY
git config --global user.email $NPM_EMAIL
git config --global user.name $NPM_USER
git status
git --no-pager diff
- name: Publish to verdaccio
shell: bash
working-directory: ./amplify-js
run: |
scripts/retry-yarn-script.sh -s publish:verdaccio -n 5 -r true
yarn info aws-amplify@unstable description
npm info aws-amplify@unstable version
48 changes: 48 additions & 0 deletions .github/actions/node-and-build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Set Node and Build
description: Checks out Amplify and builds the package
inputs:
is-prebuild:
required: false
default: false
runs:
using: 'composite'
steps:
- name: Setup Node.js 16
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 https://github.com/actions/setup-node/commit/64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
with:
node-version: 16
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
id: cache-build-artifacts
with:
path: |
**/node_modules
**/dist
**/lib
**/lib-esm/
**/es/
**/esm/
**/cjs/
**/packages/core/src/Platform/version.ts
key: ${{ runner.os }}-build-artifacts-${{ hashFiles('./amplify-js/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-artifacts-
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
# TODO We should be able to skip yarn / bootstrap if we cache enough things. Leaving because skipping causes issues.
- name: Install
if: inputs.is-prebuild != 'true' || steps.cache-build-artifacts.outputs.cache-hit != 'true'
run: yarn
shell: bash
working-directory: ./amplify-js
- name: Bootstrap
if: inputs.is-prebuild != 'true' || steps.cache-build-artifacts.outputs.cache-hit != 'true'
run: yarn bootstrap
shell: bash
working-directory: ./amplify-js
- name: Build packages
if: steps.cache-build-artifacts.outputs.cache-hit != 'true'
run: yarn build
shell: bash
working-directory: ./amplify-js
47 changes: 47 additions & 0 deletions .github/actions/npm-publish/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish to NPM
description: Publish changes from the current commit to npm using the target release process.

inputs:
github_user:
description: The git user to make commits with
required: true
github_email:
description: The git email to make commits with
required: true
target:
description: The release process target (either release or preid)
required: true
preid:
description: The preid to release to when the target is preid. The preid process will fail if this isn't provided.
required: false
npm_token:
description: The npm token that gives the job npm permissions
required: true

runs:
using: 'composite'
steps:
- name: Set github commit user
shell: bash
env:
GITHUB_EMAIL: ${{ inputs.github_email }}
GITHUB_USER: ${{ inputs.github_user }}
run: |
git config --global user.email $GITHUB_EMAIL
git config --global user.name $GITHUB_USER
- name: Run npm publish
if: github.repository_owner == 'aws-amplify'
shell: bash
working-directory: ./amplify-js
env:
NPM_TOKEN: ${{ inputs.npm_token }}
GH_SHA: ${{ github.sha }}
TARGET: ${{ inputs.target }}
PREID_PREFIX: ${{ inputs.preid || '' }}
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
export PREID_HASH_SUFFIX=$(echo $GH_SHA | cut -c -7 | sed 's/^/\./')
git status
git --no-pager diff
yarn publish:$TARGET
51 changes: 51 additions & 0 deletions .github/actions/setup-samples-staging/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Setup Amplify Integration Test Package
description: Checks out "amplify-js-samples-staging" and builds the package with caching

inputs:
GH_TOKEN_STAGING_READ:
description: The token that grants read access to the sample staging repo
required: true

runs:
using: 'composite'
steps:
- name: Create cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 https://github.com/actions/cache/commit/88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
id: cache-samples-staging-build
with:
key: aws-amplify-js-samples-staging-build-${{ github.sha }}
path: |
./amplify-js-samples-staging/node_modules
/home/runner/.cache/Cypress
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
- name: Checkout staging repo
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f
with:
repository: ${{ github.repository_owner }}/amplify-js-samples-staging
path: amplify-js-samples-staging
token: ${{ inputs.GH_TOKEN_STAGING_READ }}

# We test on the staging branch that corresponds to the amplify-js branch
# when it exists and test on the default branch `main` otherwise
- name: Staging repo branch selection
shell: bash
working-directory: ./amplify-js-samples-staging
env:
BRANCH: ${{ github.ref_name }}
run: |
if git ls-remote --exit-code --heads origin $BRANCH >/dev/null 2>&1; then
# Branch exists, checkout and echo success message
git fetch origin $BRANCH
git checkout $BRANCH
echo "Checked out branch: $BRANCH"
else
# Branch doesn't exist, echo error message
echo "Branch '$BRANCH' does not exist"
fi
- name: Install
run: |
yarn
shell: bash
working-directory: ./amplify-js-samples-staging
37 changes: 0 additions & 37 deletions .github/actions/setup-verdaccio-action/action.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/actions/setup-verdaccio-action/config.yaml

This file was deleted.

Loading

0 comments on commit 4b2dec5

Please sign in to comment.