GithubHelp home page GithubHelp logo

isabella232 / rails-app-with-knapsack_pro Goto Github PK

View Code? Open in Web Editor NEW

This project forked from knapsackpro/rails-app-with-knapsack_pro

0.0 0.0 0.0 614 KB

Example of Ruby on Rails app with knapsack_pro gem. See the gem https://github.com/KnapsackPro/knapsack_pro-ruby

License: MIT License

Ruby 62.13% JavaScript 0.47% CSS 0.49% HTML 5.11% Shell 28.18% Gherkin 2.16% Dockerfile 0.49% SCSS 0.98%

rails-app-with-knapsack_pro's Introduction

Rails app with knapsack_pro gem

Circle CI Knapsack Pro Parallel CI builds for RSpec - Queue Mode - GitHub Actions

This is example Ruby on Rails app with knapsack_pro gem. Knapsack Pro splits tests across CI nodes and makes sure that tests will run comparable time on each node.

You can read more about knapsack_pro gem here. You will find there info how to set up your test suite and how to do it on your favorite CI server.

How to load knapsack_pro rake tasks

See Rakefile.

Parallel rspec test suite with knapsack_pro

How to set up knapsack_pro

See spec/spec_helper.rb

You can use below command on CI to run tests:

# Run this on first CI server
$ KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=0 bundle exec rake knapsack_pro:rspec

# Run this on second CI server
$ KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=1 bundle exec rake knapsack_pro:rspec

See .circleci/config.yml to see how we set up CircleCI.

Parallel cucumber test suite with knapsack_pro

How to set up knapsack_pro

See features/support/knapsack_pro.rb

You can use below command on CI to run tests:

# Run this on first CI server
$ KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=0 bundle exec rake knapsack_pro:cucumber

# Run this on second CI server
$ KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=1 bundle exec rake knapsack_pro:cucumber

See .circleci/config.yml to see how we set up CircleCI.

Parallel minitest test suite with knapsack_pro

How to set up knapsack_pro

See test/test_helper.rb

You can use below command on CI to run tests:

# Run this on first CI server
$ KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=0 bundle exec rake knapsack_pro:minitest

# Run this on second CI server
$ KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=1 bundle exec rake knapsack_pro:minitest

See .circleci/config.yml to see how we set up CircleCI.

Parallel test-unit test suite with knapsack_pro

How to set up knapsack_pro

See test-unit/test_helper.rb

You can use below command on CI to run tests:

# Run this on first CI server
$ KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=0 bundle exec rake knapsack_pro:test_unit

# Run this on second CI server
$ KNAPSACK_PRO_CI_NODE_TOTAL=2 KNAPSACK_PRO_CI_NODE_INDEX=1 bundle exec rake knapsack_pro:test_unit

See .circleci/config.yml to see how we set up CircleCI.

Development of this project

Ensure you created databases:

$ rake db:create db:migrate
$ TEST_ENV_NUMBER=1 rake db:create db:migrate
$ TEST_ENV_NUMBER=2 rake db:create db:migrate

In bin directory are files:

  • bin/knapsack_pro_rspec
  • bin/knapsack_pro_minitest
  • bin/knapsack_pro_test_unit
  • bin/knapsack_pro_cucumber

They exist for test reason when you want to run this project on local machine. In that case the KNAPSACK_PRO_ENDPOINT is pointed to staging which is reserved only for Knapsack Pro developers.

RSpec dry run

$ mkdir -p tmp/knapsack_pro/rspec

$ bundle exec rspec --dry-run --format json --out tmp/knapsack_pro/rspec/dry_run.json spec

rails-app-with-knapsack_pro's People

Contributors

arturt avatar shadre avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.