Merge branch 'rc-release-5.8.10' into support-107541 #4945
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Full suite check | |
on: | |
push: | |
schedule: | |
- cron: "0 6 * * *" | |
env: # https://stackoverflow.com/questions/59867124/how-can-i-access-github-action-environment-variables-within-a-bash-script-run-by | |
TEST_BOOSTERS_RSPEC_TEST_FILE_PATTERN: "{spec,components/benefit_markets/spec,components/benefit_sponsors,components/notifier,components/sponsored_benefits,components/transport_gateway,components/transport_profiles}/**/*_spec.rb" | |
TB_RSPEC_FORMATTER: "progress" | |
jobs: | |
testing_matrix: | |
name: ${{matrix.command_configs.name}} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
node: [12.x] | |
mongodb-version: ["3.6"] | |
command_configs: | |
- name: rubocop | |
skip_js: "true" | |
test_command: | | |
git fetch --no-tags origin | |
bundle exec rubocop-git origin/master | grep "no offenses detected" | |
# - name: Brakeman In Main app | |
# skip_js: 'true' | |
# test_command: | | |
# brakeman -i config/brakeman.ignore | |
# - name: Brakeman In Components | |
# skip_js: 'true' | |
# test_command: | | |
# for test_dir in `ls -1 components`; do | |
# cd components/$test_dir | |
# brakeman -i config/brakeman.ignore | |
# cd ../.. | |
# done | |
- name: rspec 1/12 | |
test_command: rspec_booster --job 1/12 | |
- name: rspec 2/12 | |
test_command: rspec_booster --job 2/12 | |
- name: rspec 3/12 | |
test_command: rspec_booster --job 3/12 | |
- name: rspec 4/12 | |
test_command: rspec_booster --job 4/12 | |
- name: rspec 5/12 | |
test_command: rspec_booster --job 5/12 | |
- name: rspec 6/12 | |
test_command: rspec_booster --job 6/12 | |
- name: rspec 7/12 | |
test_command: rspec_booster --job 7/12 | |
- name: rspec 8/12 | |
test_command: rspec_booster --job 8/12 | |
- name: rspec 9/12 | |
test_command: rspec_booster --job 9/12 | |
- name: rspec 10/12 | |
test_command: rspec_booster --job 10/12 | |
- name: rspec 11/12 | |
test_command: rspec_booster --job 11/12 | |
- name: rspec 12/12 | |
test_command: rspec_booster --job 12/12 | |
- name: cucumber 1/4 | |
test_command: | | |
cp -f config/cucumber.yml config/cucumber.yml.bak | |
cp -f config/cucumber_split.yml config/cucumber.yml | |
cat config/cucumber.yml | |
export DISPLAY=:99 | |
if cucumber_booster --job 1/4 features | |
then | |
echo "Cucumber passed the first time!" | |
exit 0 | |
else | |
cat config/cucumber.yml | |
ls -ltr && ls -ltr tmp | |
echo "catting rerun.txt" | |
cat rerun.txt | |
echo "Give cucumber one more try" | |
if bundle exec cucumber @rerun.txt --profile first_rerun | |
then | |
echo "Cucumber worked on retry" | |
exit 0 | |
else | |
echo "Give cucumber yet another try" | |
cat config/cucumber.yml | |
bundle exec cucumber @tmp/cucumber_failures_2.log --profile second_rerun | |
fi | |
fi | |
needs_chromedriver: true | |
- name: cucumber 2/4 | |
test_command: | | |
cp -f config/cucumber.yml config/cucumber.yml.bak | |
cp -f config/cucumber_split.yml config/cucumber.yml | |
cat config/cucumber.yml | |
export DISPLAY=:99 | |
if cucumber_booster --job 2/4 features | |
then | |
echo "Cucumber passed the first time!" | |
exit 0 | |
else | |
cat config/cucumber.yml | |
ls -ltr && ls -ltr tmp | |
echo "catting rerun.txt" | |
cat rerun.txt | |
echo "Give cucumber one more try" | |
if bundle exec cucumber @rerun.txt --profile first_rerun | |
then | |
echo "Cucumber worked on retry" | |
exit 0 | |
else | |
echo "Give cucumber yet another try" | |
cat config/cucumber.yml | |
bundle exec cucumber @tmp/cucumber_failures_2.log --profile second_rerun | |
fi | |
fi | |
needs_chromedriver: true | |
- name: cucumber 3/4 | |
test_command: | | |
cp -f config/cucumber.yml config/cucumber.yml.bak | |
cp -f config/cucumber_split.yml config/cucumber.yml | |
cat config/cucumber.yml | |
export DISPLAY=:99 | |
if cucumber_booster --job 3/4 features | |
then | |
echo "Cucumber passed the first time!" | |
exit 0 | |
else | |
cat config/cucumber.yml | |
ls -ltr && ls -ltr tmp | |
echo "catting rerun.txt" | |
cat rerun.txt | |
echo "Give cucumber one more try" | |
if bundle exec cucumber @rerun.txt --profile first_rerun | |
then | |
echo "Cucumber worked on retry" | |
exit 0 | |
else | |
echo "Give cucumber yet another try" | |
cat config/cucumber.yml | |
bundle exec cucumber @tmp/cucumber_failures_2.log --profile second_rerun | |
fi | |
fi | |
needs_chromedriver: true | |
- name: cucumber 4/4 | |
test_command: | | |
cp -f config/cucumber.yml config/cucumber.yml.bak | |
cp -f config/cucumber_split.yml config/cucumber.yml | |
cat config/cucumber.yml | |
export DISPLAY=:99 | |
if cucumber_booster --job 4/4 features | |
then | |
echo "Cucumber passed the first time!" | |
exit 0 | |
else | |
cat config/cucumber.yml | |
cp -f config/cucumber.yml.bak config/cucumber.yml | |
cat config/cucumber.yml | |
ls -ltr && ls -ltr tmp | |
echo "catting rerun.txt" | |
cat rerun.txt | |
echo "Give cucumber one more try" | |
if bundle exec cucumber @rerun.txt --profile first_rerun | |
then | |
echo "Cucumber worked on retry" | |
exit 0 | |
else | |
echo "Give cucumber yet another try" | |
bundle exec cucumber @tmp/cucumber_failures_2.log --profile second_rerun | |
fi | |
fi | |
needs_chromedriver: true | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
rubygems: 3.3.26 | |
bundler-cache: true | |
- name: Setup Node.js for use with actions | |
uses: actions/setup-node@v1 | |
if: matrix.command_configs.skip_js != 'true' | |
with: | |
# Version Spec of the version to use. Examples: 10.x, 10.15.1, >=10.15.0, lts | |
node-version: ${{ matrix.node }} | |
- name: Launch MongoDB | |
uses: wbari/start-mongoDB@v0.2 | |
if: matrix.command_configs.skip_js != 'true' | |
with: | |
mongoDBVersion: ${{ matrix.mongodb-version }} | |
- name: Set up Chromedriver | |
if: matrix.command_configs.needs_chromedriver | |
uses: nanasess/setup-chromedriver@master | |
- name: Cache Gems | |
uses: actions/cache@v1 | |
with: | |
path: vendor/bundle | |
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | |
- name: Cache Node Modules | |
id: npm-cache | |
if: matrix.command_configs.skip_js != 'true' | |
uses: actions/cache@v1 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }} | |
- name: bundle install | |
run: | | |
gem install bundler -v '1.17.3' | |
bundle config path vendor/bundle | |
bundle install --jobs 4 --retry 3 | |
gem install treye-semaphore_test_boosters --version '2.5.1' | |
gem install brakeman -v 5.4.1 | |
- name: yarn install | |
if: matrix.command_configs.skip_js != 'true' && steps.npm-cache.outputs.cache-hit != 'true' | |
run: | | |
yarn install | |
- name: run webpack | |
if: matrix.command_configs.skip_js != 'true' | |
run: | | |
NODE_ENV=test RAILS_ENV=test ./bin/webpack | |
- name: run tests | |
run: ${{matrix.command_configs.test_command}} |