diff --git a/.circleci/config.yml b/.circleci/config.yml index 951cb23..95869c4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,4 +1,8 @@ version: 2.1 + +orbs: + codecov: codecov/codecov@4.0.1 + references: default_docker_ruby_executor: &default_docker_ruby_executor image: cimg/ruby:3.3.0 @@ -51,11 +55,6 @@ jobs: command: | gem install bundler bundle check || bundle install - - 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 - run: sudo apt -y update; sudo apt install -y postgresql-client - run: name: Install postgresql-client @@ -71,41 +70,12 @@ jobs: name: Run RSpec (headless) command: | mkdir /tmp/test-results - ./cc-test-reporter before-build TESTFILES=$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings) bundle exec rspec $TESTFILES --profile 10 --format RspecJunitFormatter --out /tmp/test-results/rspec.xml --format progress - - run: - name: Code Climate Test Coverage - command: | - ./cc-test-reporter format-coverage -t simplecov -o "coverage/codeclimate.$CIRCLE_NODE_INDEX.json" - - persist_to_workspace: - root: coverage - paths: - - codeclimate.*.json - - store_test_results: - path: /tmp/test-results + - codecov/upload - store_artifacts: - path: /tmp/test-results - destination: test-results + path: coverage - upload-coverage: - working_directory: ~/land/land_index - docker: - - *default_docker_ruby_executor - environment: - CC_TEST_REPORTER_ID: 6aa31a8c5421bb710854bc69f9a7d8d48492125de2a76ebdbc50f6167d9cc748 - steps: - - attach_workspace: - at: ~/land/land_index - - 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 - - run: - name: Combine and Upload Coverage - command: | - ./cc-test-reporter sum-coverage --output - codeclimate.*.json | ./cc-test-reporter upload-coverage --debug --input - workflows: version: 2.1 build_and_test: @@ -114,6 +84,3 @@ workflows: - test: requires: - build - - upload-coverage: - requires: - - test diff --git a/README.md b/README.md index a4eeaa2..0cc0b8a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ # Land +[![codecov](https://codecov.io/gh/Beyond-Finance/land/graph/badge.svg?token=D2L5P2D9AI)](https://codecov.io/gh/Beyond-Finance/land) + Land is a clickstream tracker for Rails applications. It will track visits, pageviews, marketing attribution and more. ## Installation diff --git a/Rakefile b/Rakefile index b78d21a..e1d95b9 100644 --- a/Rakefile +++ b/Rakefile @@ -41,12 +41,6 @@ else task default: :spec end -# Clean up some clutter in `rake -T`. -%w[ - app:template - app:update -].each { |name| Rake::Task[name].clear } - %w[ clean clobber_rdoc diff --git a/app/.codeclimate b/app/.codeclimate deleted file mode 100644 index b0accc7..0000000 --- a/app/.codeclimate +++ /dev/null @@ -1,5 +0,0 @@ -plugins: - bundler-audit: - enabled: true - fixme: - enabled: true