Skip to content

Commit

Permalink
Merge branch 'main' into amplify-js/update-issue-template
Browse files Browse the repository at this point in the history
  • Loading branch information
stocaaro committed Dec 7, 2022
2 parents 8faa645 + fc4940b commit c84135c
Show file tree
Hide file tree
Showing 567 changed files with 35,227 additions and 241,669 deletions.
113 changes: 111 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ commands:
browser:
type: string
default: ''
amplifyjs_dir:
# optional - dir to amplify js workspace
type: string
default: ''
steps:
- run:
name: 'Install << parameters.test_name >> sample'
Expand All @@ -118,12 +122,12 @@ commands:
name: 'Run cypress tests for << parameters.test_name >> sample on dev'
command: |
cd ~/amplify-js-samples-staging
~/amplify-js/.circleci/retry-yarn-script.sh -s 'ci:test << parameters.framework >> << parameters.category >> << parameters.sample_name >> << parameters.spec >> << parameters.browser >> dev' -n 3
~/amplify-js/.circleci/retry-yarn-script.sh -s 'ci:test << parameters.framework >> << parameters.category >> << parameters.sample_name >> << parameters.spec >> << parameters.browser >> dev << parameters.amplifyjs_dir >>' -n 3
- run:
name: 'Run cypress tests for << parameters.test_name >> sample on prod'
command: |
cd ~/amplify-js-samples-staging
~/amplify-js/.circleci/retry-yarn-script.sh -s 'ci:test << parameters.framework >> << parameters.category >> << parameters.sample_name >> << parameters.spec >> << parameters.browser >> prod' -n 3
~/amplify-js/.circleci/retry-yarn-script.sh -s 'ci:test << parameters.framework >> << parameters.category >> << parameters.sample_name >> << parameters.spec >> << parameters.browser >> prod << parameters.amplifyjs_dir >>' -n 3
- store_artifacts:
path: ~/amplify-js-samples-staging/cypress/videos
- store_artifacts:
Expand Down Expand Up @@ -387,6 +391,9 @@ jobs:
echo $SSH_HOST_PUBLIC_KEY >> ~/.ssh/known_hosts
git clone $AMPLIFY_JS_SAMPLES_STAGING_URL
cd amplify-js-samples-staging
branchExists=true
git ls-remote --heads origin <<pipeline.git.branch>> | grep <<pipeline.git.branch>> >/dev/null || branchExists=false
if [ "$branchExists" = true ]; then git checkout <<pipeline.git.branch>>; fi
yarn
- save_cache:
key: amplify-js-{{ .Branch }}-{{ checksum "amplify-js-samples-staging/yarn.lock" }}
Expand Down Expand Up @@ -436,6 +443,13 @@ jobs:
working_directory: ~/amplify-js-samples-staging/samples
steps:
- prepare_test_env
- integ_test_js:
test_name: 'React Credentials Different Region'
framework: react
category: auth
sample_name: credentials-auth
spec: credentials-auth
browser: << parameters.browser >>
- integ_test_js:
test_name: 'React Custom Authenticator'
framework: react
Expand Down Expand Up @@ -480,6 +494,23 @@ jobs:
sample_name: amplify-authenticator
spec: custom-authenticator
browser: << parameters.browser >>
integ_javascript_auth:
parameters:
browser:
type: string
executor: js-test-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples
steps:
- prepare_test_env
- integ_test_js:
test_name: 'JavaScript Auth CDN'
framework: javascript
category: auth
sample_name: auth-cdn
spec: auth-cdn
browser: << parameters.browser >>
amplifyjs_dir: ~/amplify-js
integ_vue_auth:
parameters:
browser:
Expand Down Expand Up @@ -1106,6 +1137,31 @@ jobs:
test_name: 'Token revocation'
category: 'auth'
spec: 'token-revocation'
integ_javascript_geo:
parameters:
browser:
type: string
executor: js-test-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples
steps:
- prepare_test_env
- integ_test_js:
test_name: 'Display Map'
framework: javascript
category: geo
sample_name: display-map-static
spec: display-map-static
browser: << parameters.browser >>
amplifyjs_dir: ~/amplify-js
- integ_test_js:
test_name: 'Search Outside Map'
framework: javascript
category: geo
sample_name: search-outside-map-static
spec: search-outside-map-static
browser: << parameters.browser >>
amplifyjs_dir: ~/amplify-js
integ_react_geo:
parameters:
browser:
Expand Down Expand Up @@ -1281,6 +1337,23 @@ jobs:
spec: selective-sync-v5
browser: << parameters.browser >>

integ_react_datastore_nested_predicate:
parameters:
browser:
type: string
executor: js-test-executor
<<: *test_env_vars
working_directory: ~/amplify-js-samples-staging/samples/react/datastore/nested-predicate
steps:
- prepare_test_env
- integ_test_js:
test_name: 'DataStore - Nested Predicate'
framework: react
category: datastore
sample_name: nested-predicate
spec: nested-predicate
browser: << parameters.browser >>

deploy:
executor: macos-executor
working_directory: ~/amplify-js
Expand Down Expand Up @@ -1319,6 +1392,12 @@ jobs:
git push origin release
git push --force-with-lease origin release:main
# Specifies the branches that can be considered releasable.
#
# Listing a branch here has the following effects:
# - Allows the branch to be published to NPM assuming there is a corresponding `publish:<branch>` script in package.json
# - Runs the full test suite against the branch in CircleCI on pushes to that branch. If the exact branch name also exists
# in the `amplify-js-samples-staging` repo, it will be used when executing tests. Otherwise, defaults to `main`.
releasable_branches: &releasable_branches
branches:
only:
Expand Down Expand Up @@ -1453,6 +1532,15 @@ workflows:
matrix:
parameters:
<<: *test_browsers
- integ_javascript_auth:
requires:
- integ_setup
- build
filters:
<<: *releasable_branches
matrix:
parameters:
<<: *test_browsers
- integ_react_datastore:
requires:
- integ_setup
Expand Down Expand Up @@ -1720,6 +1808,15 @@ workflows:
# matrix:
# parameters:
# <<: *test_browsers
- integ_javascript_geo:
requires:
- integ_setup
- build
filters:
<<: *releasable_branches
matrix:
parameters:
browser: [chrome]
- integ_react_geo:
requires:
- integ_setup
Expand Down Expand Up @@ -1804,6 +1901,15 @@ workflows:
matrix:
parameters:
<<: *test_browsers
- integ_react_datastore_nested_predicate:
requires:
- integ_setup
- build
filters:
<<: *releasable_branches
matrix:
parameters:
<<: *test_browsers

- deploy:
filters:
Expand Down Expand Up @@ -1839,6 +1945,7 @@ workflows:
- 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_rn_ios_storage
- integ_rn_ios_storage_multipart_progress
Expand All @@ -1851,6 +1958,7 @@ workflows:
# - 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
Expand All @@ -1861,6 +1969,7 @@ workflows:
- integ_react_iot_reconnect
- integ_react_api_reconnect
- integ_react_datastore_selective_sync
- integ_react_datastore_nested_predicate
- post_release:
filters:
branches:
Expand Down
3 changes: 3 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
paths-ignore:
- docs
- packages/aws-amplify-react-native/docs
43 changes: 43 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Ref: https://tinyurl.com/5d6rr8s7
name: 'CodeQL'

on:
push:
pull_request:

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ['javascript']

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
# Minimal depth 2 so we can checkout the commit before possible merge commit.
fetch-depth: 2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml

# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: '/language:${{matrix.language}}'
2 changes: 1 addition & 1 deletion docs/api/assets/js/search.js

Large diffs are not rendered by default.

Loading

0 comments on commit c84135c

Please sign in to comment.