diff --git a/.github/workflows/a11y-heading-order.yml b/.github/workflows/a11y-heading-order.yml deleted file mode 100644 index 265402e535..0000000000 --- a/.github/workflows/a11y-heading-order.yml +++ /dev/null @@ -1,268 +0,0 @@ -name: Accessibility Tests - Heading Order - -on: - workflow_dispatch: - schedule: - - cron: '0 7 * * 1' # 3am ET, Monday - -env: - CHROMEDRIVER_FILEPATH: /usr/local/share/chrome_driver/chromedriver - BUILD_TYPE: vagovprod - CHANNEL_ID: C01RAS1KAQK #-daily-accessibility-scan - -jobs: - build: - name: Build - runs-on: [self-hosted, asg] - timeout-minutes: 180 - defaults: - run: - working-directory: content-build - - env: - DRUPAL_ADDRESS: https://cms-content-build-medc0xjkxm4jmpzxl3tfbcs7qcddsivh.ci.cms.va.gov - NODE_EXTRA_CA_CERTS: /etc/ssl/certs/ca-certificates.crt - - steps: - - name: Checkout vagov-content - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - with: - repository: department-of-veterans-affairs/vagov-content - path: vagov-content - - - name: Checkout content-build - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - with: - path: content-build - - - name: Checkout vets-website - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - with: - repository: department-of-veterans-affairs/vets-website - path: vets-website - - - name: Get Node version - id: get-node-version - run: echo NODE_VERSION=$(cat .nvmrc) >> $GITHUB_OUTPUT - - - name: Setup Node - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 - with: - node-version: ${{ steps.get-node-version.outputs.NODE_VERSION }} - - - name: Install Yarn - shell: bash - run: npm i -g yarn@1.19.1 - - - name: Install vets-website dependencies - uses: nick-invision/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd # v2.8.3 - with: - command: cd vets-website && yarn install --frozen-lockfile --prefer-offline --network-concurrency 1 - max_attempts: 3 - timeout_minutes: 10 - - - name: Build vets-website - run: yarn build --verbose --buildtype=${{ env.BUILD_TYPE }} - working-directory: vets-website - timeout-minutes: 30 - - - name: Install content-build dependencies - uses: nick-invision/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd # v2.8.3 - with: - command: cd content-build && yarn install --frozen-lockfile --prefer-offline --network-concurrency 1 - max_attempts: 3 - timeout_minutes: 7 - - - name: Set Drupal address - run: echo "DRUPAL_ADDRESS=https://prod.cms.va.gov" >> $GITHUB_ENV - - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef # v2.0.0 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-gov-west-1 - - - name: set Drupal prod password - uses: department-of-veterans-affairs/action-inject-ssm-secrets@d8e6de3bde4dd728c9d732baef58b3c854b8c4bb # latest - with: - ssm_parameter: /cms/prod/drupal_api_users/content_build_api/password - env_variable_name: DRUPAL_PASSWORD - - - name: set Drupal prod username - uses: department-of-veterans-affairs/action-inject-ssm-secrets@d8e6de3bde4dd728c9d732baef58b3c854b8c4bb # latest - with: - ssm_parameter: /cms/prod/drupal_api_users/content_build_api/username - env_variable_name: DRUPAL_USERNAME - - - name: Build content-build - run: yarn build --buildtype=${{ env.BUILD_TYPE }} --asset-source=local --drupal-address=https://prod.cms.va.gov --drupal-user=${{ env.DRUPAL_USERNAME }} --drupal-password="${{ env.DRUPAL_PASSWORD }}" --pull-drupal --drupal-max-parallel-requests=15 --no-drupal-proxy --verbose - env: - NODE_ENV: production - - - name: Copy vets-website assets to content-build - run: | - cd .. - cp -arf vets-website/build/${{ env.BUILD_TYPE }}/* content-build/build/${{ env.BUILD_TYPE }} - - - name: Compress E2E test build - run: tar -C build/${{ env.BUILD_TYPE }} -cjf test-build.tar.bz2 . - - - name: Upload E2E test build artifact - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 - with: - name: test-build.tar.bz2 - path: content-build/test-build.tar.bz2 - retention-days: 1 - - - name: Runner clean up - run: rm -rf ../content-build - - a11y: - name: Accessibility Tests - needs: build - timeout-minutes: 120 - runs-on: [self-hosted, asg] - container: - image: public.ecr.aws/cypress-io/cypress/browsers:node16.13.2-chrome100-ff98 - options: --user 1001:1001 - volumes: - - /usr/local/share:/share - - /etc/ssl/certs:/etc/ssl/certs - strategy: - fail-fast: false - max-parallel: 32 - matrix: - ci_node_index: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32] - - env: - NODE_EXTRA_CA_CERTS: /etc/ssl/certs/ca-certificates.crt - CHROMEDRIVER_FILEPATH: /share/chrome_driver/chromedriver - - steps: - - name: Checkout content-build - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - - - name: Get Node version - id: get-node-version - run: echo NODE_VERSION=$(cat .nvmrc) >> $GITHUB_OUTPUT - - - name: Setup Node - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 - with: - node-version: ${{ steps.get-node-version.outputs.NODE_VERSION }} - - - name: Install dependencies - uses: nick-invision/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd # v2.8.3 - with: - command: yarn install --frozen-lockfile --prefer-offline --production=false --network-concurrency 1 - max_attempts: 3 - timeout_minutes: 7 - env: - YARN_CACHE_FOLDER: .cache/yarn - - - name: Download production build artifact - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 - with: - name: test-build.tar.bz2 - - - name: Unpack build - run: | - mkdir -p build/${{ env.BUILD_TYPE }} - tar -C build/${{ env.BUILD_TYPE }} -xjf /__w/content-build/content-build/test-build.tar.bz2 - - - name: Create a11y failures CSV file - run: touch a11y_failures.csv - - - name: Start content-build - run: node src/platform/testing/e2e/test-server.js --buildtype ${{ env.BUILD_TYPE }} --port=3002 & - - - name: Run Cypress E2E Tests - run: CYPRESS_STEP=${{ matrix.ci_node_index }} CYPRESS_CONTENT_BUILD_PORT=3002 CYPRESS_RUN_HEADINGS=true yarn cy:run --browser chrome --headless --port 3001 --config baseUrl=http://localhost:3002,video=false,specPattern=**/tests/**/*.a11y.spec.js --reporter mochawesome --reporter-options "configFile=config/cypress-reporters.json" --spec "src/platform/site-wide/tests/sitemap/sitemap.a11y.spec.js" - - - name: Rename Mochawesome JSON file - if: ${{ always() }} - run: mv mochawesome-report/mochawesome.json mochawesome-report/mochawesome-${{ matrix.ci_node_index }}.json - - - name: Rename failures CSV file - if: ${{ always() }} - run: mv a11y_failures.csv a11y_failures-${{ matrix.ci_node_index }}.csv - - - name: Archive Mochawesome test results - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 - if: ${{ always() }} - with: - name: cypress-mochawesome-test-results - path: mochawesome-report - retention-days: 1 - - - name: Archive failures CSV - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 - if: ${{ always() }} - with: - name: a11y_failures - path: a11y_failures-${{ matrix.ci_node_index }}.csv - retention-days: 30 - - - name: Runner clean up - run: | - rm -rf build - rm /__w/content-build/content-build/test-build.tar.bz2 - - slack: - name: Notify Slack - runs-on: ubuntu-latest - needs: [build, a11y] - if: ${{ always() && (needs.a11y.result == 'success' || needs.a11y.result == 'failure' || needs.build.result == 'success' || needs.build.result == 'failure') }} - defaults: - run: - working-directory: content-build - - steps: - - name: Checkout content-build - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - with: - path: content-build - - - name: Download failures CSV - if: ${{ needs.a11y.result == 'failure' }} - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 - with: - name: a11y_failures - path: content-build - - - name: Merge failure CSV files - if: ${{ needs.a11y.result == 'failure' }} - run: cat *csv > a11y_failures.csv - - - name: Archive merged failures CSV file - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 - if: ${{ always() }} - with: - name: a11y_failures - path: content-build/a11y_failures.csv - retention-days: 30 - - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef # v2.0.0 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: 'us-gov-west-1' - - - name: Get Slack bot token - uses: department-of-veterans-affairs/action-inject-ssm-secrets@d8e6de3bde4dd728c9d732baef58b3c854b8c4bb # latest - with: - ssm_parameter: /devops/github_actions_slack_bot_user_token - env_variable_name: SLACK_BOT_TOKEN - - - name: Accessibility Test Failure - uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844 # v1.23.0 - if: ${{ needs.a11y.result == 'failure' || needs.build.result == 'failure' }} - continue-on-error: true - env: - SSL_CERT_DIR: /etc/ssl/certs - SLACK_BOT_TOKEN: ${{ env.SLACK_BOT_TOKEN }} - with: - payload: '{"attachments": [{"color": "#FF0800","blocks": [{"type": "section","text": {"type": "mrkdwn","text": " ATTN: Accessibility heading-order tests have failed on run: "}}]}]}' - channel-id: ${{ env.CHANNEL_ID }}