Update HSI PDF #3403
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: RSpec Internal Tests | |
on: pull_request | |
jobs: | |
rspec-internal: | |
name: RSpec Internal Tests | |
runs-on: ubuntu-22.04 | |
env: | |
DB_ADAPTER: mysql2 | |
MYSQL_PWD: root | |
RAILS_ENV: test | |
steps: | |
- name: 'Checkout the repo' | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: 'Set Ruby and Bundler Versions' | |
run: | | |
echo "RUBY_VERSION=3.3.1" >> $GITHUB_ENV | |
echo "BUNDLER_VERSION=`cat ./Gemfile.lock | grep -A 1 'BUNDLED WITH' | grep -oE '[0-9]\.[0-9]'`" >> $GITHUB_ENV | |
- name: 'Install Ruby and gems' | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ env.RUBY_VERSION }} | |
bundler-cache: true | |
- name: 'setup node for node-sass' | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: 'Install MySQL Packages' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y mysql-client libmysqlclient-dev | |
- name: 'Start MySQL' | |
run: sudo systemctl start mysql | |
- name: 'Setup Test DB' | |
run: | | |
mysql -u root -e 'CREATE DATABASE IF NOT EXISTS dashv2_test' | |
mysql -u root -e 'CREATE USER IF NOT EXISTS travis@localhost' | |
mysql -u root -e 'GRANT ALL ON dashv2_test.* TO travis@localhost' | |
mysql -u root -e 'set global log_bin_trust_function_creators=1' | |
bin/rails db:migrate:reset RAILS_ENV=test | |
- name: 'RSpec Controller Tests' | |
run: bin/bundle exec rspec --force-color --format RSpec::Github::Formatter --format progress --tag ~skip spec/controllers | |
- name: 'RSpec Job Tests' | |
run: bin/bundle exec rspec --force-color --format RSpec::Github::Formatter --format progress --tag ~skip spec/jobs | |
- name: 'RSpec Model Tests' | |
run: bin/bundle exec rspec --force-color --format RSpec::Github::Formatter --format progress --tag ~skip spec/models | |
- name: 'RSpec Service Tests' | |
run: bin/bundle exec rspec --force-color --format RSpec::Github::Formatter --format progress --tag ~skip spec/services | |
- name: 'RSpec Library Tests' | |
run: bin/bundle exec rspec --force-color --format RSpec::Github::Formatter --format progress --tag ~skip spec/lib | |
- name: 'RSpec Task Tests' | |
run: bin/bundle exec rspec --force-color --format RSpec::Github::Formatter --format progress --tag ~skip spec/tasks |