diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index cb6d9828ae3..00000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,300 +0,0 @@ -# Ruby CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-ruby/ for more details -# -version: 2.1 - -orbs: - browser-tools: circleci/browser-tools@1.1 - jq: circleci/jq@2.2.0 - slack: circleci/slack@3.4.2 - -executors: - # Common container definition used by all jobs - ruby_browsers: - docker: - # Specify the Ruby version you desire here - - image: cimg/ruby:3.0.4-browsers - environment: - CIRCLE_CI: 'true' - RAILS_ENV: test - BUNDLER_VERSION: 2.2.32 - # The base image sets NODE_VERSION environment variable, which we don't intend to use. Its - # presence will cause NVM to treat it as the default version. Unsetting it allows for NVM - # to use the version from .nvmrc instead. - NODE_VERSION: '' - - # Specify service dependencies here if necessary - # CircleCI maintains a library of pre-built images - # documented at https://circleci.com/docs/2.0/circleci-images/ - - image: cimg/postgres:13.4 - environment: - POSTGRES_USER: circleci - - - image: redis:5.0.8 - -commands: - install-browser-tools-no-firefox: - steps: - - browser-tools/install-browser-tools: - install-firefox: false - install-geckodriver: false - node-install: - steps: - - run: - name: Switch Node.js version - command: | - wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash - export NVM_DIR="$HOME/.nvm" - . "$NVM_DIR/nvm.sh" --install - echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV; - echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV; - - run: - name: Print Node.js version - command: node -v - yarn-install: - steps: - - restore_cache: - keys: - - v2-identity-idp-yarn-{{ checksum "yarn.lock" }} - - v2-identity-idp-yarn- - - run: - name: Install Yarn - command: yarn install --frozen-lockfile --ignore-engines --cache-folder ~/.cache/yarn - - save_cache: - key: v2-identity-idp-yarn-{{ checksum "yarn.lock" }} - paths: - - ~/.cache/yarn - yarn-production-install: - steps: - - restore_cache: - keys: - - v2-identity-idp-yarn-production-{{ checksum "yarn.lock" }} - - v2-identity-idp-yarn-production - - run: - name: Install Yarn - command: yarn install --production --frozen-lockfile --ignore-engines --cache-folder ~/.cache/yarn - - save_cache: - key: v2-identity-idp-yarn-production-{{ checksum "yarn.lock" }} - paths: - - ~/.cache/yarn - - bundle-install: - steps: - - run: gem install bundler --version $BUNDLER_VERSION - - restore_cache: - keys: - - v3-identity-idp-bundle-{{ checksum "Gemfile.lock" }} - - run: - name: Install dependencies - command: | - bundle check || bundle install --deployment --jobs=4 --retry=3 --without deploy development doc production --path vendor/bundle - - save_cache: - key: v3-identity-idp-bundle-{{ checksum "Gemfile.lock" }} - paths: - - vendor/bundle -jobs: - setup: - working_directory: ~/identity-idp - executor: ruby_browsers - steps: - - checkout - - node-install - - yarn-install - - bundle-install - - run: - name: Test Setup - command: | - bundle exec rake assets:precompile - - persist_to_workspace: - root: . - paths: - - tmp/cache/assets - - public/assets - - public/packs - - ruby_test: - executor: ruby_browsers - - environment: - CC_TEST_REPORTER_ID: faecd27e9aed532634b3f4d3e251542d7de9457cfca96a94208a63270ef9b42e - COVERAGE: true - - parallelism: 5 - - working_directory: ~/identity-idp - - steps: - - install-browser-tools-no-firefox - - checkout - - node-install - - yarn-install - - bundle-install - - run: - name: Install AWS CLI - command: | - sudo apt-get update - sudo apt-get install python3-pip python-dev jq - sudo pip install awscli --ignore-installed six - - run: - name: Install Code Climate Test Reporter - command: | - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - chmod +x ./cc-test-reporter - aws s3 --region us-west-2 rm s3://login-gov-test-coverage/coverage/$CIRCLE_PREVIOUS_BUILD_NUM --recursive - - run: - name: Wait for DB - command: dockerize -wait tcp://localhost:5432 -timeout 1m - - run: - name: Test Setup - command: | - cp config/application.yml.default config/application.yml - cp config/service_providers.localdev.yml config/service_providers.yml - cp config/agencies.localdev.yml config/agencies.yml - cp config/iaa_gtcs{.localdev,}.yml - cp config/iaa_orders{.localdev,}.yml - cp config/iaa_statuses{.localdev,}.yml - cp config/integration_statuses{.localdev,}.yml - cp config/integrations{.localdev,}.yml - cp config/partner_account_statuses{.localdev,}.yml - cp config/partner_accounts{.localdev,}.yml - cp -a keys.example keys - cp -a certs.example certs - cp pwned_passwords/pwned_passwords.txt.sample pwned_passwords/pwned_passwords.txt - bundle exec rake db:create db:migrate --trace - bundle exec rake db:seed - - attach_workspace: - at: . - - run: - name: Run Tests - command: | - mkdir /tmp/test-results - ./cc-test-reporter before-build - - bundle exec rake knapsack:rspec - - run: - name: Code Climate Test Coverage - command: | - aws s3 sync coverage/ "s3://login-gov-test-coverage/coverage-artifacts/$CIRCLE_BUILD_NUM/$CIRCLE_NODE_INDEX" --exclude '*' --include '.resultset.json' --include '.resultset.json.lock' - ./cc-test-reporter format-coverage -t simplecov -o "coverage/codeclimate.$CIRCLE_NODE_INDEX.json" - aws s3 sync coverage/ "s3://login-gov-test-coverage/coverage/$CIRCLE_BUILD_NUM" - # collect reports - - store_test_results: - path: /tmp/test-results - - store_artifacts: - path: /tmp/test-results - destination: test-results - - deploy: - command: | - aws s3 sync "s3://login-gov-test-coverage/coverage/$CIRCLE_BUILD_NUM" coverage/ - ./cc-test-reporter sum-coverage --output - --parts $CIRCLE_NODE_TOTAL coverage/codeclimate.*.json | ./cc-test-reporter upload-coverage --input - - aws s3 sync "s3://login-gov-test-coverage/coverage-artifacts/$CIRCLE_BUILD_NUM" coverage/ - bundle exec spec/simplecov_merger.rb - mkdir coverage_summary - mv coverage/index.html coverage_summary/ - mv coverage/assets coverage_summary/ - mv coverage/.resultset.json coverage_summary/ - aws s3 --region us-west-2 rm s3://login-gov-test-coverage/coverage-artifacts/$CIRCLE_BUILD_NUM --recursive - - store_artifacts: - path: coverage_summary/ - - javascript_test: - working_directory: ~/identity-idp - executor: ruby_browsers - steps: - - install-browser-tools-no-firefox - - checkout - - node-install - - yarn-install - - run: - name: Run Tests - command: | - yarn test - - javascript_build: - working_directory: ~/identity-idp - executor: ruby_browsers - environment: - NODE_ENV: production - steps: - - checkout - - node-install - - yarn-production-install - - bundle-install - - run: - name: Run Tests - command: | - bundle exec rake assets:precompile - - lints: - working_directory: ~/identity-idp - executor: ruby_browsers - steps: - - checkout - - node-install - - yarn-install - - bundle-install - - run: - name: Run Lints - command: | - make lint - check-pinpoint-config: - executor: ruby_browsers - steps: - - checkout - - node-install - - yarn-install - - bundle-install - - run: - name: Check current AWS Pinpoint country support - command: |- - make lint_country_dialing_codes - - slack/status: - fail_only: true - failure_message: ':aws-emoji: :red_circle: AWS Pinpoint country configuration is out of date' - check_changelog: - docker: - - image: cimg/ruby:3.0 - steps: - - checkout - - run: - name: Check Changelog - command: |- - if [ -z "${CIRCLE_PULL_REQUEST}" ] || echo ${CIRCLE_BRANCH} | grep -q '^stages/' - then - echo "Skipping changelock check because this is not a PR or is a release branch" - exit 0 - else - ./scripts/changelog_check.rb -b main -s "${CIRCLE_BRANCH}" - fi - -workflows: - version: 2 - release: - jobs: - - setup - - check_changelog - - ruby_test: - requires: - - setup - - javascript_build: - requires: - - setup - - javascript_test: - requires: - - setup - - lints: - requires: - - setup - - daily-external-pinpoint-checker: - jobs: - - check-pinpoint-config - triggers: - - schedule: - # Once a day at 12pm - cron: '0 12 * * *' - filters: - branches: - only: - - main diff --git a/README.md b/README.md index c7c28948dd2..2632c32c585 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,6 @@ Login.gov Identity Provider (IdP) ================================= -[![Build Status](https://circleci.com/gh/18F/identity-idp.svg?style=svg)](https://circleci.com/gh/18F/identity-idp) -[![Code Climate](https://api.codeclimate.com/v1/badges/e78d453f7cbcac64a664/maintainability)](https://codeclimate.com/github/18F/identity-idp/maintainability) -[![Test Coverage](https://api.codeclimate.com/v1/badges/e78d453f7cbcac64a664/test_coverage)](https://codeclimate.com/github/18F/identity-idp/test_coverage) - Login.gov is the public's one account for government. Use one account and password for secure, private access to participating government agencies. This repository contains the core code base and documentation for the identity management system powering secure.login.gov. diff --git a/config/environments/test.rb b/config/environments/test.rb index 711fe6db86a..0ae75ffc808 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -36,10 +36,6 @@ config.middleware.use RackSessionAccess::Middleware - # Disable lograge when computing coverage and not in CircleCI, where lograge is required. - # This enables scanning for view test coverage with `rake test:scan_log_for_view_coverage` - config.lograge.enabled = !ENV['COVERAGE'] || ENV['CI'] - config.after_initialize do # Having bullet enabled in the test environment causes issues with unit # tests that may not make user of eager loaded values. We disable it by diff --git a/spec/simplecov_helper.rb b/spec/simplecov_helper.rb index 77bea2b9ed3..3a327d3a971 100644 --- a/spec/simplecov_helper.rb +++ b/spec/simplecov_helper.rb @@ -60,9 +60,6 @@ def self.configured_formatters if ENV['GITLAB_CI'] # GitLab CI uses Cobertura formatter to display diffs in pull requests formatters << SimpleCov::Formatter::CoberturaFormatter - elsif ENV['CIRCLE_CI'] - # CircleCI uses JSON formatting for CodeClimate - formatters << SimpleCov::Formatter::JSONFormatter end formatters