Skip to content

Commit

Permalink
fix: remove beta canaries (#1141)
Browse files Browse the repository at this point in the history
Co-authored-by: David Lopez <[email protected]>
  • Loading branch information
letsbelopez and David Lopez authored Nov 30, 2023
1 parent 3064fec commit e2e5f41
Showing 1 changed file with 0 additions and 162 deletions.
162 changes: 0 additions & 162 deletions .github/workflows/canaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,168 +11,6 @@ permissions:
contents: read # This is required for actions/checkout

jobs:
beta-canary:
runs-on: ubuntu-latest
steps:
- name: Checkout Studio Codegen
uses: actions/checkout@v2
with:
path: amplify-codegen-ui
- name: Setup Node.js LTS
uses: actions/setup-node@v2
with:
node-version: lts/*
- name: Install Beta Amplfy CLI
run: npm i -g @aws-amplify/cli@beta
- name: Create a test react app
run: npx create-react-app e2e-test-app
- name: Install test app dependencies
working-directory: e2e-test-app
run: |
npm i aws-amplify@^5.0.0 @aws-amplify/ui-react@^5.0.0
npm i --save-dev cypress
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.E2E_TEST_ROLE_ARN }}
aws-region: us-west-2
- name: Create temp AWS credentials file
working-directory: e2e-test-app
run: |
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID && \
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY && \
aws configure set aws_session_token $AWS_SESSION_TOKEN && \
aws configure set default.region $AWS_REGION
- name: Run CLI Pull in test app
working-directory: e2e-test-app
run: |
FORCE_RENDER=1 amplify pull --appId ${{ secrets.E2E_TEST_APP_ID }} --envName staging -y --providers "{\
\"awscloudformation\":{\
\"configLevel\":\"project\",\
\"useProfile\":true,\
\"profileName\":\"default\",\
}\
}"
- name: Write test files
working-directory: e2e-test-app
run: cp -r ../amplify-codegen-ui/packages/test-generator/e2e-test-templates/. .
- name: Cypress run
uses: cypress-io/github-action@v2
with:
working-directory: e2e-test-app
install: false
start: npm start
wait-on: 'http://localhost:3000'
wait-on-timeout: 120
config-file: cypress.config.js
env:
REACT_APP_USER_EMAIL: ${{ secrets.E2E_TEST_USER_EMAIL }}
REACT_APP_USER_PASSWORD: ${{ secrets.E2E_TEST_USER_PASSWORD }}
write-beta-canary-failure-metric:
runs-on: ubuntu-latest
needs: beta-canary
if: ${{ failure() }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.CANARY_METRIC_ROLE_ARN }}
aws-region: us-west-2
- run: aws cloudwatch put-metric-data --metric-name BetaSuccessRate --namespace CodegenUiCanaries --value 0

write-beta-canary-success-metric:
runs-on: ubuntu-latest
needs: beta-canary
if: ${{ success() }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.CANARY_METRIC_ROLE_ARN }}
aws-region: us-west-2
- run: aws cloudwatch put-metric-data --metric-name BetaSuccessRate --namespace CodegenUiCanaries --value 1

beta-canary-v6:
runs-on: ubuntu-latest
steps:
- name: Checkout Studio Codegen
uses: actions/checkout@v2
with:
path: amplify-codegen-ui
- name: Setup Node.js LTS
uses: actions/setup-node@v2
with:
node-version: lts/*
- name: Install Beta Amplfy CLI
run: npm i -g @aws-amplify/cli@beta
- name: Create a test react app
run: npx create-react-app e2e-test-app
- name: Install test app dependencies
working-directory: e2e-test-app
run: |
npm i aws-amplify@^6.0.0 @aws-amplify/ui-react@^6.0.0
npm i --save-dev cypress
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.E2E_TEST_ROLE_ARN }}
aws-region: us-west-2
- name: Create temp AWS credentials file
working-directory: e2e-test-app
run: |
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID && \
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY && \
aws configure set aws_session_token $AWS_SESSION_TOKEN && \
aws configure set default.region $AWS_REGION
- name: Run CLI Pull in test app
working-directory: e2e-test-app
run: |
FORCE_RENDER=1 amplify pull --appId ${{ secrets.E2E_TEST_APP_ID }} --envName staging -y --providers "{\
\"awscloudformation\":{\
\"configLevel\":\"project\",\
\"useProfile\":true,\
\"profileName\":\"default\",\
}\
}"
- name: Write test files
working-directory: e2e-test-app
run: cp -r ../amplify-codegen-ui/packages/test-generator/e2e-test-templates-amplify-js-v6/. .
- name: Cypress run
uses: cypress-io/github-action@v2
with:
working-directory: e2e-test-app
install: false
start: npm start
wait-on: 'http://localhost:3000'
wait-on-timeout: 120
config-file: cypress.config.js
env:
REACT_APP_USER_EMAIL: ${{ secrets.E2E_TEST_USER_EMAIL }}
REACT_APP_USER_PASSWORD: ${{ secrets.E2E_TEST_USER_PASSWORD }}
write-beta-canary-v6-failure-metric:
runs-on: ubuntu-latest
needs: beta-canary-v6
if: ${{ failure() }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.CANARY_METRIC_ROLE_ARN }}
aws-region: us-west-2
- run: aws cloudwatch put-metric-data --metric-name BetaSuccessRate --namespace CodegenUiCanaries --value 0

write-beta-canary-v6-success-metric:
runs-on: ubuntu-latest
needs: beta-canary-v6
if: ${{ success() }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.CANARY_METRIC_ROLE_ARN }}
aws-region: us-west-2
- run: aws cloudwatch put-metric-data --metric-name BetaSuccessRate --namespace CodegenUiCanaries --value 1

release-canary:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit e2e5f41

Please sign in to comment.