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

feat: add canary for CLI Codegen UI functionality against beta and latest tags #329

Merged
merged 1 commit into from
Jan 11, 2022
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
51 changes: 51 additions & 0 deletions .github/workflows/beta-canary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Beta Canary

on:
schedule:
- cron: '15 17,19,21,23 * * *'

jobs:
amplify-cli-tests:
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 @aws-amplify/ui-react
npm i --save-dev cypress
- 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\":false,\
\"profileName\":\"default\",\
\"accessKeyId\":\"${{ secrets.E2E_TEST_ACCESS_KEY }}\",\
\"secretAccessKey\":\"${{ secrets.E2E_TEST_SECRET_KEY }}\",\
\"region\":\"us-west-2\"\
}\
}"
- 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
51 changes: 51 additions & 0 deletions .github/workflows/latest-canary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Latest Canary

on:
schedule:
- cron: '15 17,19,21,23 * * *'

jobs:
amplify-cli-tests:
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 Latest Amplfy CLI
run: npm i -g @aws-amplify/cli@latest
- 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 @aws-amplify/ui-react
npm i --save-dev cypress
- 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\":false,\
\"profileName\":\"default\",\
\"accessKeyId\":\"${{ secrets.E2E_TEST_ACCESS_KEY }}\",\
\"secretAccessKey\":\"${{ secrets.E2E_TEST_SECRET_KEY }}\",\
\"region\":\"us-west-2\"\
}\
}"
- 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