Allow Knapsack to work for Forks (#8413)

This commit is contained in:
Molly Struve 2020-06-11 11:59:02 -05:00 committed by GitHub
parent 81f77715a6
commit 4c4b332b2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -65,7 +65,7 @@ script:
- bundle exec rails webpacker:compile
- bundle exec rails db:schema:load
- './cc-test-reporter before-build'
- 'bundle exec rake knapsack_pro:rspec'
- 'bin/knapsack_pro_rspec'
- '[ ! -f .approvals ] || bundle exec approvals verify --ask false'
- if [ "$KNAPSACK_PRO_CI_NODE_INDEX" == "0" ]; then yarn test --colors; fi
- if [ "$KNAPSACK_PRO_CI_NODE_INDEX" == "0" ]; then ./cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.lcov.json; fi

8
bin/knapsack_pro_rspec Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
if [ "$KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC" = "" ]; then
KNAPSACK_PRO_ENDPOINT=https://api-disabled-for-fork.knapsackpro.com \
KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC=disabled-for-fork \
bundle exec rake knapsack_pro:rspec # use Regular Mode here always
else
bundle exec rake knapsack_pro:rspec
fi