Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add local cloud e2e script #12643

Merged
merged 8 commits into from
May 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"clean": "nx reset && nx run-many --target=clean --all && yarn rimraf tsconfig.tsbuildinfo",
"cloud-e2e": "source ./scripts/cloud-e2e.sh && cloudE2E",
"cloud-e2e-beta": "source ./scripts/cloud-e2e.sh && cloudE2EBeta",
"cloud-e2e-local": "source ./scripts/cloud-e2e.sh && cloudE2ELocal",
"commit": "git-cz",
"coverage:collect": "ts-node ./scripts/collect-test-coverage.ts",
"coverage": "codecov || exit 0",
Expand Down
8 changes: 8 additions & 0 deletions scripts/cloud-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ function triggerBuild {
RESULT=$(aws codebuild start-build-batch --profile="${CLOUD_E2E_PROFILE}" --project-name AmplifyCLI-E2E-Testing --source-version=$TARGET_BRANCH --query 'buildBatch.id' --output text)
echo "https://us-east-1.console.aws.amazon.com/codesuite/codebuild/$CLOUD_E2E_ACCOUNT/projects/AmplifyCLI-E2E-Testing/batch/$RESULT?region=us-east-1"
}
function cloudE2ELocal {
echo Running Local E2E Test Suite
export CLOUD_E2E_PROFILE=AmplifyCLIE2ELocal
export CLOUD_E2E_ACCOUNT=$E2E_ACCOUNT_LOCAL
export TARGET_BRANCH=$CURR_BRANCH
authenticate
triggerBuild
}
function cloudE2EBeta {
echo Running Beta E2E Test Suite
export CLOUD_E2E_PROFILE=AmplifyCLIE2EBeta
Expand Down
2 changes: 2 additions & 0 deletions scripts/sample.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
E2E_ACCOUNT_LOCAL=
E2E_ACCOUNT_BETA=
E2E_ACCOUNT_PROD=
RELEASE_ACCOUNT_LOCAL=
RELEASE_ACCOUNT_BETA=
RELEASE_ACCOUNT_PROD=