forked from aws-amplify/amplify-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathamplify.yml
58 lines (58 loc) · 2.24 KB
/
amplify.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
version: 1
applications:
- appRoot: docs
frontend:
phases:
preBuild:
commands:
- rm -rf node_modules
- nvm install 16.13 # NodeJS 16.13+ is the latest version that Amplify Hosting supports
- nvm use 16
- node -v
- export FLUTTER_HOME=${HOME}/sdks/flutter
- git clone -b stable --depth 1 https://github.com/flutter/flutter.git ${FLUTTER_HOME}
- 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
- (cd .. && yarn install && yarn build)
build:
commands:
- nvm install 16.13
- nvm use 16
- node -v
- yarn flutter:build
- yarn build
artifacts:
baseDirectory: .next
files:
- '**/*'
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'