Creates fork disabling on forks

Changes run job to use bash file
This commit is contained in:
filipefurtad0
2022-10-29 19:08:54 +01:00
parent 2a8ef5a45e
commit d6aa0168b2
2 changed files with 14 additions and 1 deletions

View File

@@ -82,7 +82,7 @@ jobs:
# https://knapsackpro.com/faq/question/how-to-split-slow-rspec-test-files-by-test-examples-by-individual-it
# KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES: true
run: |
bundle exec rake knapsack_pro:rspec
bin/knapsack_pro_rspec
- name: Archive failed tests screenshots
if: failure()

13
bin/knapsack_pro_rspec Executable file
View File

@@ -0,0 +1,13 @@
#!/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 \
KNAPSACK_PRO_MAX_REQUEST_RETRIES=0 \
bundle exec rake knapsack_pro:rspec # use Regular Mode here always
else
# Regular Mode
bundle exec rake knapsack_pro:rspec
# or you can use Queue Mode instead of Regular Mode if you like
# bundle exec rake knapsack_pro:queue:rspec
fi