-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First iteration of qa tag: deploy and run e2e test against Flex
- Loading branch information
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# This is a basic workflow to publish a Twilio Flex-plugins with Github Actions | ||
|
||
name: Pre-release QA | ||
|
||
# Controls when the action will run. | ||
on: | ||
workflow_dispatch: | ||
# inputs: | ||
# changelog: | ||
# description: Release Changelog - Add a comment about the changes to be included in this release. | ||
# required: true | ||
|
||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '14.x' | ||
# Call main-action to compile and deploy | ||
- name: Executing main-action | ||
uses: ./.github/actions/main-action | ||
with: | ||
account-sid: ${{ secrets.E2E_DEV_ACCOUNT_SID }} | ||
auth-token: ${{ secrets.E2E_DEV_AUTH_TOKEN }} | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ${{ secrets.AWS_DEFAULT_REGION }} | ||
|
||
# Build Playwright | ||
- name: Install e2e-tests dependencies | ||
run: npm install | ||
working-directory: ./e2e-tests | ||
- name: Setup dependencies for playwright/browsers | ||
uses: microsoft/playwright-github-action@v1 | ||
- name: Install Playwright CLI | ||
run: npx playwright install | ||
working-directory: ./e2e-tests | ||
|
||
# Run E2E tests against actual E2E Flex instance | ||
- name: Run Playwright tests | ||
run: DEBUG=pw:api PLAYWRIGHT_BASEURL=${{secrets.PLAYWRIGHT_BASEURL_E2E}} PLAYWRIGHT_USER_USERNAME=${{secrets.PLAYWRIGHT_USER_USERNAME}} PLAYWRIGHT_USER_PASSWORD=${{secrets.PLAYWRIGHT_USER_PASSWORD}} TWILIO_ACCOUNT_SID=${{secrets.E2E_DEV_ACCOUNT_SID}} TWILIO_AUTH_TOKEN=${{secrets.E2E_DEV_AUTH_TOKEN}} npx playwright test | ||
working-directory: ./e2e-tests | ||
|
||
# Upload artifacts | ||
- uses: actions/upload-artifact@v2 | ||
if: ${{ always() }} | ||
with: | ||
name: test-artifacts | ||
path: e2e-tests/test-results |