Skip to content
name: Cypress Integration Test Workflow
on:
workflow_dispatch:
inputs:
branch:
description: 'select main in the above roster and then input the branch name with CI failures'
required: true
product:
description: '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
# TO-DO: add a commit input to allow devs to determine a commit point of failure in the branch
env:
BUILDTYPE: vagovprod
VETS_WEBSITE_CHANNEL_ID: ''
jobs:
validate-and-set-product-selection:
name: Set product directory for testing
runs-on: ubuntu-latest
steps:
- name: Run integration helper script
run: |
chmod +x ./script/github-actions/cypress-integration-test.sh
./scripts/integration-helper.sh "${{ github.ref }}"
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@cd7d8d697e10461458bc61a30d094dc601a8b017
with:
fetch-depth: 0
ref: ${{ github.event.inputs.branch }}
- name: Install dependencies
uses: ./.github/workflows/install
timeout-minutes: 30
with:
key: ${{ hashFiles('yarn.lock') }}
yarn_cache_folder: .cache/yarn
path: |
.cache/yarn
node_modules
- name: Configure AWS Credentials
uses: ./.github/workflows/configure-aws-credentials
with:
aws_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: us-gov-west-1
- 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: Get Mapbox Token
uses: ./.github/workflows/inject-secrets
with:
ssm_parameter: /dsva-vagov/vets-website/dev/mapbox_token
env_variable_name: MAPBOX_TOKEN
- name: Build
run: yarn build --verbose --buildtype=${{ env.BUILDTYPE }}
timeout-minutes: 30
- name: Generate build details
run: |
cat > build/${{ env.BUILDTYPE }}/BUILD.txt << EOF
BUILDTYPE=${{ env.BUILDTYPE }}
NODE_ENV=production
BRANCH_NAME=$(echo "${GITHUB_REF#refs/heads/}")
CHANGE_TARGET=null
RUN_ID=${{ github.run_id }}
RUN_NUMBER=${{ github.run_number }}
REF=${{ github.sha }}
BUILDTIME=$(date +%s)
EOF
- name: Compress and archive build
run: tar -C build/${{ env.BUILDTYPE }} -cjf ${{ env.BUILDTYPE }}.tar.bz2 .
- name: Upload build artifact
uses: ./.github/workflows/upload-artifact
with:
name: ${{ env.BUILDTYPE }}.tar.bz2
path: ${{ env.BUILDTYPE }}.tar.bz2
retention-days: 1
checkout-vets-website:
name: Checkout vets-website
uses: actions/checkout@cd7d8d697e10461458bc61a30d094dc601a8b017

Check failure on line 98 in .github/workflows/cypress-integration-test.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/cypress-integration-test.yml

Invalid workflow file

invalid value workflow reference: references to workflows must be rooted in '.github/workflows'
checkout-target-repo:
name: Checkout Cypress Integration Tests repo
uses: actions/checkout@cd7d8d697e10461458bc61a30d094dc601a8b017
with:
repository: department-of-veterans-affairs/vagov-cypress-integration-tests
token: ${{ env.VA_VSP_BOT_GITHUB_TOKEN }}
path: vagov-cypress-integration-tests
call-integration-test-workflow:
name: Call Integration Test Workflow
uses: vagov-cypress-integration-tests/.github/workflows/cypress-integration-test-workflow.yml@main
secrets: inherit
notify-failure:
name: Notify Failure
runs-on: ubuntu-latest
if: ${{ failure() || cancelled() }}
needs: call-integration-test-workflow
steps:
- name: Checkout
uses: actions/checkout@cd7d8d697e10461458bc61a30d094dc601a8b017
- name: Notify Slack
uses: ./.github/workflows/slack-notify
continue-on-error: true
with:
payload: '{"attachments": [{"color": "#FF0800","blocks": [{"type": "section","text": {"type": "mrkdwn","text": "vets-website manual dev/staging deploy failed!: <https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}>"}}]}]}'
channel_id: ${{ env.VETS_WEBSITE_CHANNEL_ID }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}