GSA/code-gov-front-end

View on GitHub
.circleci/config.yml

Summary

Maintainability
Test Coverage
version: 2
jobs:
  build:
    docker:
      - image: cimg/node:20.10-browsers
        environment:
          CHROME_PATH: /usr/bin/google-chrome
          NODE_OPTIONS: --openssl-legacy-provider

    steps:
      - checkout
      - run: npm install
      - run: npm run build # needed because the policy and about plugin components are added during the build step
      - run: npm run test:ci
      - run: npm run lint
      - run: npm run test-server & sleep 5; npm run test-pa11y
  deploy-bundle-analysis:
    docker:
      - image: ubuntu
        environment:
          TZ: "America/New_York"
          DEBIAN_FRONTEND: "noninteractive"
    environment:
      TZ: "America/New_York"
      DEBIAN_FRONTEND: "noninteractive"
    steps:
      - run: apt-get update
      - run: apt-get install -y tzdata
      - run: ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime
      - run: dpkg-reconfigure --frontend noninteractive tzdata
      - run: apt-get install -y build-essential git npm nodejs
      - checkout
      - run: npm install
      - run: npm run analyze
      - run: cd dist && mkdir report && cp report.html report/report.html
      - run: 'git config --global user.email "code@gsa.gov" && git config --global user.name "code.gov ci"'
      - run: CODE_GOV_RELATIVE_DIR='/dist/report' CODE_GOV_BRANCH='federalist-bundle-analysis' npm run deploy
workflows:
  version: 2
  build-test-deploy:
    jobs:
      - build
      - deploy-bundle-analysis:
          filters:
            branches:
              only: master