Skip to content

Commit

Permalink
yaml change
Browse files Browse the repository at this point in the history
  • Loading branch information
shwet2407 committed Sep 17, 2024
1 parent d20569a commit c1438eb
Showing 1 changed file with 97 additions and 40 deletions.
137 changes: 97 additions & 40 deletions .github/workflows/~reusable_e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ on:
workflow_call:
inputs:
BRANCH:
description: "A branch passed from the caller workflow to run the test on."
description: 'A branch passed from the caller workflow to run the test on.'
required: true
type: string
PACKAGE_VERSION:
description: "A package-version of cli passed from the caller workflow. Which will be used to create and release plugins."
description: 'A package-version of cli passed from the caller workflow. Which will be used to create and release plugins.'
required: true
type: string
FLEX_UI_VERSION:
description: "A flex-ui version passed from the caller workflow. It decides the version of FLEX UI on tests will run on."
description: 'A flex-ui version passed from the caller workflow. It decides the version of FLEX UI on tests will run on.'
required: true
type: string
NPM_IGNORE_PREFIX:
description: "A npm-ignore-prefix passed from the caller workflow."
description: 'A npm-ignore-prefix passed from the caller workflow.'
required: true
type: string

Expand All @@ -24,60 +24,89 @@ on:
CONSOLE_PASSWORD:
required: true
CONSOLE_EMAIL_linux:
description: "An email passed from the caller workflow, it will be used for login in linux environment."
description: 'An email passed from the caller workflow, it will be used for login in linux environment.'
required: true
TWILIO_ACCOUNT_SID_linux:
description: "An account-sid passed from the caller workflow, it will be used for authentication of APIs in linux environment."
description: 'An account-sid passed from the caller workflow, it will be used for authentication of APIs in linux environment.'
required: true
TWILIO_AUTH_TOKEN_linux:
description: "An account-token passed from the caller workflow, it will be used for authentication of APIs in linux environment."
description: 'An account-token passed from the caller workflow, it will be used for authentication of APIs in linux environment.'
required: true
CONSOLE_EMAIL_win32:
description: "An email passed from the caller workflow, it will be used for login in windows environment."
description: 'An email passed from the caller workflow, it will be used for login in windows environment.'
required: true
TWILIO_ACCOUNT_SID_win32:
description: "An account-sid passed from the caller workflow, it will be used for authentication of APIs in windows environment."
description: 'An account-sid passed from the caller workflow, it will be used for authentication of APIs in windows environment.'
required: true
TWILIO_AUTH_TOKEN_win32:
description: "An account-token passed from the caller workflow, it will be used for authentication of APIs in windows environment."
description: 'An account-token passed from the caller workflow, it will be used for authentication of APIs in windows environment.'
required: true
CONSOLE_EMAIL_darwin:
description: "An email passed from the caller workflow, it will be used for login in mac environment."
description: 'An email passed from the caller workflow, it will be used for login in mac environment.'
required: true
TWILIO_ACCOUNT_SID_darwin:
description: "An account-sid passed from the caller workflow, it will be used for authentication of APIs in mac environment."
description: 'An account-sid passed from the caller workflow, it will be used for authentication of APIs in mac environment.'
required: true
TWILIO_AUTH_TOKEN_darwin:
description: "An account-token passed from the caller workflow, it will be used for authentication of APIs in mac environment."
description: 'An account-token passed from the caller workflow, it will be used for authentication of APIs in mac environment.'
required: true
env:
BRANCH: ${{ inputs.BRANCH }}
NPM_IGNORE_PREFIX: ${{ inputs.NPM_IGNORE_PREFIX }}
PACKAGE_VERSION: ${{ inputs.PACKAGE_VERSION }}
FLEX_UI_VERSION: ${{ inputs.FLEX_UI_VERSION }}
CONSOLE_EMAIL: ${{ secrets.CONSOLE_EMAIL }}
CONSOLE_PASSWORD: ${{ secrets.CONSOLE_PASSWORD }}
CONSOLE_EMAIL_linux: ${{ secrets.CONSOLE_EMAIL_linux }}
TWILIO_ACCOUNT_SID_linux: ${{ secrets.TWILIO_ACCOUNT_SID_linux }}
TWILIO_AUTH_TOKEN_linux: ${{ secrets.TWILIO_AUTH_TOKEN_linux }}
CONSOLE_EMAIL_win32: ${{ secrets.CONSOLE_EMAIL_win32 }}
TWILIO_ACCOUNT_SID_win32: ${{ secrets.TWILIO_ACCOUNT_SID_win32 }}
TWILIO_AUTH_TOKEN_win32: ${{ secrets.TWILIO_AUTH_TOKEN_win32 }}
CONSOLE_EMAIL_darwin: ${{ secrets.CONSOLE_EMAIL_darwin }}
TWILIO_ACCOUNT_SID_darwin: ${{ secrets.TWILIO_ACCOUNT_SID_darwin }}
TWILIO_AUTH_TOKEN_darwin: ${{ secrets.TWILIO_AUTH_TOKEN_darwin }}
NODE_OPTIONS: --max-old-space-size=8192

jobs:
node20:
strategy:
matrix:
os: [windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
env:
BRANCH: ${{ inputs.BRANCH }}
NPM_IGNORE_PREFIX: ${{ inputs.NPM_IGNORE_PREFIX }}
PACKAGE_VERSION: ${{ inputs.PACKAGE_VERSION }}
FLEX_UI_VERSION: ${{ inputs.FLEX_UI_VERSION }}
CONSOLE_EMAIL: ${{ secrets.CONSOLE_EMAIL }}
CONSOLE_PASSWORD: ${{ secrets.CONSOLE_PASSWORD }}
CONSOLE_EMAIL_linux: ${{ secrets.CONSOLE_EMAIL_linux }}
TWILIO_ACCOUNT_SID_linux: ${{ secrets.TWILIO_ACCOUNT_SID_linux }}
TWILIO_AUTH_TOKEN_linux: ${{ secrets.TWILIO_AUTH_TOKEN_linux }}
CONSOLE_EMAIL_win32: ${{ secrets.CONSOLE_EMAIL_win32 }}
TWILIO_ACCOUNT_SID_win32: ${{ secrets.TWILIO_ACCOUNT_SID_win32 }}
TWILIO_AUTH_TOKEN_win32: ${{ secrets.TWILIO_AUTH_TOKEN_win32 }}
CONSOLE_EMAIL_darwin: ${{ secrets.CONSOLE_EMAIL_darwin }}
TWILIO_ACCOUNT_SID_darwin: ${{ secrets.TWILIO_ACCOUNT_SID_darwin }}
TWILIO_AUTH_TOKEN_darwin: ${{ secrets.TWILIO_AUTH_TOKEN_darwin }}
# node20-ubuntu:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v3
# with:
# node-version: '20'
# - name: Install project dependencies
# run: npm ci
# - name: Build packages
# run: npm run build
# - name: Run e2e tests - JS
# run: |
# cd packages/flex-plugin-e2e-tests
# npm run start
# env:
# TS: 0
# - name: Run e2e tests - TS
# env:
# TS: 1
# run: |
# cd packages/flex-plugin-e2e-tests
# npm run start
# - name: Upload Screenshots
# uses: actions/upload-artifact@v3
# if: always()
# with:
# name: Ubuntu-screenshots
# path: packages/flex-plugin-e2e-tests/screenshots

node20-macos:
needs: node20-ubuntu
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "20"
node-version: '20'
- name: Install project dependencies
run: npm ci
- name: Build packages
Expand All @@ -88,11 +117,39 @@ jobs:
npm run start
env:
TS: 0
- name: Kill node for Windows os
if: ${{ matrix.os == 'windows-latest' }}
- name: Run e2e tests - TS
env:
TS: 1
run: |
echo "os is: ${{ matrix.os }} ${{ runner.os }}"
taskkill /f /im node.exe
cd packages/flex-plugin-e2e-tests
npm run start
- name: Upload Screenshots
uses: actions/upload-artifact@v3
if: always()
with:
name: Macos-screenshots
path: packages/flex-plugin-e2e-tests/screenshots

node20-windows:
needs: [ node20-ubuntu, node20-macos ]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install project dependencies
run: npm ci
- name: Build packages
run: npm run build
- name: Run e2e tests - JS
run: |
cd packages/flex-plugin-e2e-tests
npm run start
env:
TS: 0
- name: Kill node for Windows os
run: taskkill /f /im node.exe
- name: Run e2e tests - TS
env:
TS: 1
Expand All @@ -103,5 +160,5 @@ jobs:
uses: actions/upload-artifact@v3
if: always()
with:
name: TS-screenshots
name: Windows-screenshots
path: packages/flex-plugin-e2e-tests/screenshots

0 comments on commit c1438eb

Please sign in to comment.