Skip to content

Cypress Integration Test Workflow #67

Cypress Integration Test Workflow

Cypress Integration Test Workflow #67

name: Cypress Integration Test Workflow
on:
workflow_dispatch:
inputs:
commit_sha:
description: 'Commit sha: from your branch'
required: true
product:
description: 'App: Your target product directory within src/applications'
required: true
# TO-DO: create a solution that maintains an updated list of active products within src/applications
env:
VETS_WEBSITE_CHANNEL_ID: ''
jobs:
integration-test:
name: Execute Cypress tests
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@cd7d8d697e10461458bc61a30d094dc601a8b017
with:
fetch-depth: 0
- name: Configure AWS Credentials
uses: aws-actions/[email protected]
with:
aws-region: us-gov-west-1
role-to-assume: arn:aws-us-gov:iam::008577686731:role/gha-frontend-nonprod-role
- name: Get va-vsp-bot token
uses: ./.github/workflows/inject-secrets
with:
ssm_parameter: /devops/VA_VSP_BOT_GITHUB_TOKEN
env_variable_name: VA_VSP_BOT_GITHUB_TOKEN
- name: Find the build
id: find-build
run: |
ARCHIVE_NAME=${{ github.event.inputs.commit_sha }}/vagovprod.tar.bz2
BUCKET_PATH=s3://vetsgov-website-builds-s3-upload/
df -H
aws s3 cp $BUCKET_PATH$ARCHIVE_NAME .
echo "1"
mkdir vets-website
tar -xvjf vagovprod.tar.bz2 -C vets-website
echo "2"
- name: Run integration helper script
id: helper
run: |
chmod +x ./script/github-actions/cypress-integration-test.sh
./script/github-actions/cypress-integration-test.sh "${{ github.event.inputs.product }}"
- name: Call reusable action
id: cypress-action
uses: department-of-veterans-affairs/vsp-github-actions/cypress-integration-test/action.yaml@cypress-integration-test-migration