Skip to content

Skomaiha/updatedtranslations2 #1022

Skomaiha/updatedtranslations2

Skomaiha/updatedtranslations2 #1022

Workflow file for this run

# Copyright (C) 2021-2023 Technology Matters
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see https://www.gnu.org/licenses/.
name: End to End Testing CI
# Action
on: [pull_request, workflow_dispatch]
concurrency: e2e
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
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
- name: Checkout Branch
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
# Create Configuration file to replace AS_DEV_ACCOUNT_SID with E2E_ACCOUNT_SID
- name: Create appConfig.js
run: cp ./public/appConfig.template.e2e.js ./public/appConfig.js
working-directory: ./plugin-hrm-form
shell: bash
- name: Replace Twilio account SID in appConfig.js
uses: falnyr/replace-env-vars-action@master
env:
TWILIO_ACCOUNT_SID: ${{ secrets.E2E_DEV_ACCOUNT_SID}}
with:
filename: ./plugin-hrm-form/public/appConfig.js
- name: Create secret.js
run: |
touch ./src/private/secret.js
working-directory: ./plugin-hrm-form
shell: bash
- name: Fill secret.js
run: |
cat <<EOT >> ./src/private/secret.js
export const datadogAccessToken = 'x';
export const datadogApplicationID = 'x';
export const fullStoryId = 'x';
EOT
working-directory: ./plugin-hrm-form
shell: bash
- name: Install Flex Plugin
uses: ./.github/actions/install-flex-plugin
- name: Run Form Definitions Server
run: NODE_ENV=development npm run dev:local-form-definition-server &
working-directory: ./plugin-hrm-form
- name: Run Flex Dev Server
run: NODE_ENV=development REACT_APP_FORM_DEFINITIONS_BASE_URL=http://localhost:8090 TWILIO_ACCOUNT_SID=${{secrets.E2E_DEV_ACCOUNT_SID}} TWILIO_AUTH_TOKEN=${{secrets.E2E_DEV_AUTH_TOKEN}} npm run start &
working-directory: ./plugin-hrm-form
- name: Run e2e tests
uses: ./.github/actions/run-e2e-tests
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
environment: local