Skip to content

Commit

Permalink
Merge pull request #2982 from aws-amplify/fileuploader/main
Browse files Browse the repository at this point in the history
chore(file-uploader): Create new tagged release for testing
  • Loading branch information
ErikCH authored Nov 15, 2022
2 parents d396551 + 5b87312 commit 41bde68
Show file tree
Hide file tree
Showing 819 changed files with 36,237 additions and 10,822 deletions.
5 changes: 3 additions & 2 deletions .github/changeset-presets/bump-react.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
'@aws-amplify/ui': patch
'@aws-amplify/ui-react': patch
'@aws-amplify/ui-react': minor
'@aws-amplify/ui-react-core': patch
'@aws-amplify/ui-react-native': major
---

Version bump for ui, ui-react and ui-react-core packages
Version bump for ui, ui-react, ui-react-native and ui-react-core packages
81 changes: 81 additions & 0 deletions .github/workflows/publish-next-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Description: This workflow runs unit + e2e tests
#
# Triggered by: merge to `next-release/main` branch

name: Publish / next-release

on:
push:
branches: [next-release/main]

jobs:
test:
uses: aws-amplify/amplify-ui/.github/workflows/reusable-e2e.yml@next-release/main
with:
commit: ${{ github.sha }}
repository: ${{ github.repository }}
secrets:
# TODO: migrate away from this account once tfn is migrated
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# TODO: migrate away from this account once tfn is migrated
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID_AUTH: ${{ secrets.AWS_ACCESS_KEY_ID_AUTH }}
AWS_SECRET_ACCESS_KEY_AUTH: ${{ secrets.AWS_SECRET_ACCESS_KEY_AUTH }}
AWS_ACCESS_KEY_ID_DATASTORE: ${{ secrets.AWS_ACCESS_KEY_ID_DATASTORE }}
AWS_SECRET_ACCESS_KEY_DATASTORE: ${{ secrets.AWS_SECRET_ACCESS_KEY_DATASTORE }}
AWS_ACCESS_KEY_ID_GEO: ${{ secrets.AWS_ACCESS_KEY_ID_GEO }}
AWS_SECRET_ACCESS_KEY_GEO: ${{ secrets.AWS_SECRET_ACCESS_KEY_GEO }}
DOMAIN: ${{ secrets.DOMAIN }}
PHONE_NUMBER: ${{ secrets.PHONE_NUMBER }}
USERNAME: ${{ secrets.USERNAME }}
NEW_PASSWORD: ${{ secrets.NEW_PASSWORD }}
VALID_PASSWORD: ${{ secrets.VALID_PASSWORD }}
SITE_URL: ${{ secrets.SITE_URL }}
DOCSEARCH_DOCS_APP_ID: ${{ secrets.DOCSEARCH_DOCS_APP_ID }}
DOCSEARCH_DOCS_API_KEY: ${{ secrets.DOCSEARCH_DOCS_API_KEY }}
DOCSEARCH_DOCS_INDEX_NAME: ${{ secrets.DOCSEARCH_DOCS_INDEX_NAME }}

publish:
needs: test
uses: ./.github/workflows/reusable-tagged-publish.yml
with:
dist-tag: next-release
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

build-test:
runs-on: ubuntu-latest
needs: publish
environment: ci
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Add Amplify CLI
run: yarn global add @aws-amplify/cli
- name: Get CLI versions
id: cli-version
run: echo "::set-output name=version::$(amplify --version)"
- name: Create or restore environments cache
id: environments-cache
uses: actions/cache@v3
with:
path: canary/environments/**/aws-exports.js
key: ${{ runner.os }}-canary-environments-${{ steps.cli-version.outputs.version }}-${{ hashFiles('canary/environments/**/amplify/**') }}
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
- name: Pull down AWS environments
if: steps.environments-cache.outputs.cache-hit != 'true'
run: yarn pull
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_AUTH }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_AUTH }}
working-directory: ./canary
- name: Setup canary apps against @next-release
run: yarn setup:next-release
working-directory: ./canary
- name: Run yarn install on each sample app
run: yarn install
working-directory: ./canary
- name: Run yarn build on each sample app
run: yarn build
working-directory: ./canary
12 changes: 12 additions & 0 deletions .github/workflows/reusable-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ on:
required: true
AWS_SECRET_ACCESS_KEY_DATASTORE:
required: true
AWS_ACCESS_KEY_ID_STORAGE:
required: true
AWS_SECRET_ACCESS_KEY_STORAGE:
required: true
AWS_ACCESS_KEY_ID_GEO:
required: true
AWS_SECRET_ACCESS_KEY_GEO:
Expand Down Expand Up @@ -112,6 +116,7 @@ jobs:
- angular
- vue
- react
- react-native
- react-core

steps:
Expand Down Expand Up @@ -321,6 +326,13 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_GEO }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_GEO }}

- name: Pull down Storage AWS environments, on cache miss
if: steps.environments-cache.outputs.cache-hit != 'true'
run: yarn environments storage pull
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_STORAGE}}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_STORAGE}}

- name: Pull down Datastore AWS environments, on cache miss
if: steps.environments-cache.outputs.cache-hit != 'true'
run: yarn environments datastore pull
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
# Description: This workflow runs unit + e2e tests on PRs targeting
# - `in-app-messaging/main`
# - `in-app-messaging/release`
# - `fileuploader/main`
#
# Triggered by:
# (1) Internal PRs: maintainer pushes a commit to PRs targeting those branches.
# (2) Fork PRs: maintainer adds "run-test" label to PRs targeting those branches.

name: Test / in-app-messaging / PRs
name: Test / file-uploader / PRs

concurrency:
group: e2e-${{ github.event.pull_request.id }}
cancel-in-progress: true

on:
pull_request_target:
branches: [in-app-messaging/main, in-app-messaging/release]
branches: [fileuploader/main]
types: [opened, synchronize, labeled]

permissions:
Expand All @@ -41,7 +40,7 @@ jobs:
const label = 'run-tests';
github.issues.removeLabel({ owner, repo, issue_number, name: label });
test:
uses: aws-amplify/amplify-ui/.github/workflows/reusable-e2e.yml@in-app-messaging/main
uses: aws-amplify/amplify-ui/.github/workflows/reusable-e2e.yml@fileuploader/main
needs: setup
with:
commit: ${{ github.event.pull_request.head.sha }}
Expand All @@ -57,6 +56,8 @@ jobs:
AWS_SECRET_ACCESS_KEY_DATASTORE: ${{ secrets.AWS_SECRET_ACCESS_KEY_DATASTORE }}
AWS_ACCESS_KEY_ID_GEO: ${{ secrets.AWS_ACCESS_KEY_ID_GEO }}
AWS_SECRET_ACCESS_KEY_GEO: ${{ secrets.AWS_SECRET_ACCESS_KEY_GEO }}
AWS_ACCESS_KEY_ID_STORAGE: ${{ secrets.AWS_ACCESS_KEY_ID_STORAGE }}
AWS_SECRET_ACCESS_KEY_STORAGE: ${{ secrets.AWS_SECRET_ACCESS_KEY_STORAGE }}
DOMAIN: ${{ secrets.DOMAIN }}
PHONE_NUMBER: ${{ secrets.PHONE_NUMBER }}
USERNAME: ${{ secrets.USERNAME }}
Expand Down
36 changes: 0 additions & 36 deletions .github/workflows/test-next-release.yml

This file was deleted.

35 changes: 32 additions & 3 deletions amplify.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version: 1
applications:
- frontend:
- appRoot: docs
frontend:
phases:
preBuild:
commands:
Expand All @@ -13,7 +14,7 @@ applications:
- export PATH="$PATH:${FLUTTER_HOME}/bin"
# Skip cypress binary installation, as it's unneeded for docs and often fails transiently
# https://docs.cypress.io/guides/references/advanced-installation#Skipping-installation
- export CYPRESS_INSTALL_BINARY=0
- export CYPRESS_INSTALL_BINARY=0
- (cd .. && yarn install && yarn build)
build:
commands:
Expand All @@ -26,4 +27,32 @@ applications:
baseDirectory: .next
files:
- '**/*'
appRoot: docs
test:
phases:
preTest:
commands:
- nvm install 16.13 # NodeJS 16.13+ is the latest version that Amplify Hosting supports
- nvm use 16
- npm install -g npm@7 # TODO: remove this line once update @angular-devkit packages.
- export NODE_OPTIONS="--max-old-space-size=8192"
- npm install
- npm install wait-on
- npm install pm2
- npm install mocha mochawesome mochawesome-merge mochawesome-report-generator
- npm install cypress
- npm run build
- npx pm2 start npm -- start
- 'npx wait-on http://localhost:3000'
test:
commands:
- 'npx cypress run --reporter mochawesome --reporter-options "reportDir=cypress/report/mochawesome-report,overwrite=false,html=false,json=true,timestamp=mmddyyyy_HHMMss"'
postTest:
commands:
- npx mochawesome-merge cypress/report/mochawesome-report/mochawesome*.json > cypress/report/mochawesome.json
- npx pm2 kill
artifacts:
baseDirectory: cypress
configFilePath: '**/mochawesome.json'
files:
- '**/*.png'
- '**/*.mp4'
12 changes: 9 additions & 3 deletions canary/apps/angular/angularcli/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,20 @@
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": []
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
Expand Down Expand Up @@ -56,7 +61,8 @@
}
]
}
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
Expand Down
26 changes: 13 additions & 13 deletions canary/apps/angular/angularcli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@
},
"private": true,
"dependencies": {
"@angular/animations": "~11.2.14",
"@angular/common": "~11.2.14",
"@angular/compiler": "~11.2.14",
"@angular/core": "~11.2.14",
"@angular/forms": "~11.2.14",
"@angular/platform-browser": "~11.2.14",
"@angular/platform-browser-dynamic": "~11.2.14",
"@angular/router": "~11.2.14",
"@angular/animations": "~12.2.16",
"@angular/common": "~12.2.16",
"@angular/compiler": "~12.2.16",
"@angular/core": "~12.2.16",
"@angular/forms": "~12.2.16",
"@angular/platform-browser": "~12.2.16",
"@angular/platform-browser-dynamic": "~12.2.16",
"@angular/router": "~12.2.16",
"@aws-amplify/ui-angular": "latest",
"aws-amplify": "latest",
"rxjs": "~6.6.0",
"tslib": "^2.0.0",
"zone.js": "~0.11.3"
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1102.13",
"@angular/cli": "~11.2.15",
"@angular/compiler-cli": "~11.2.14",
"@angular-devkit/build-angular": "~12.2.18",
"@angular/cli": "~12.2.18",
"@angular/compiler-cli": "~12.2.16",
"@types/jasmine": "~3.6.0",
"@types/node": "^12.11.1",
"codelyzer": "^6.0.0",
Expand All @@ -44,6 +44,6 @@
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~4.1.5"
"typescript": "~4.3.5"
}
}
2 changes: 1 addition & 1 deletion canary/apps/angular/angularcli/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { BrowserModule } from '@angular/platform-browser';

import { AppComponent } from './app.component';
import { AmplifyAuthenticatorModule } from '@aws-amplify/ui-angular';
import Amplify from 'aws-amplify';
import { Amplify } from 'aws-amplify';
import aws_exports from '../../../../../environments/auth-with-email/src/aws-exports.js';
Amplify.configure(aws_exports);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ export const environment = {
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
2 changes: 1 addition & 1 deletion canary/apps/angular/angularcli/src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
import 'zone.js'; // Included with Angular CLI.

/***************************************************************************************************
* APPLICATION IMPORTS
Expand Down
2 changes: 1 addition & 1 deletion canary/apps/angular/angularcli/src/test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files

import 'zone.js/dist/zone-testing';
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
Expand Down
2 changes: 1 addition & 1 deletion canary/apps/react/cra-ts/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
useAuthenticator,
} from '@aws-amplify/ui-react';
import '@aws-amplify/ui-react/styles.css';
import Amplify from 'aws-amplify';
import { Amplify } from 'aws-amplify';
import aws_exports from '../../../../environments/auth-with-email/src/aws-exports.js';
Amplify.configure(aws_exports);

Expand Down
2 changes: 1 addition & 1 deletion canary/apps/react/cra/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
useAuthenticator,
} from '@aws-amplify/ui-react';
import '@aws-amplify/ui-react/styles.css';
import Amplify from 'aws-amplify';
import { Amplify } from 'aws-amplify';
import aws_exports from '../../../../environments/auth-with-email/src/aws-exports.js';
Amplify.configure(aws_exports);

Expand Down
2 changes: 1 addition & 1 deletion canary/apps/react/next/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
useAuthenticator,
} from '@aws-amplify/ui-react';
import '@aws-amplify/ui-react/styles.css';
import Amplify from 'aws-amplify';
import { Amplify } from 'aws-amplify';
import aws_exports from '../../../../environments/auth-with-email/src/aws-exports.js';
Amplify.configure(aws_exports);

Expand Down
Loading

0 comments on commit 41bde68

Please sign in to comment.