Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dockerfiles/database.yml.postgresql
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ development:

test:
<<: *default
database: <%= ENV.fetch('PGDATABASETEST') { ENV.fetch('PGDATABASE', '') + '-test' } %>
database: <%= "#{ENV.fetch('PGDATABASETEST') { ENV.fetch('PGDATABASE', '') + '-test' }}#{ENV['TEST_ENV_NUMBER']}" %>

production:
<<: *default
6 changes: 3 additions & 3 deletions .github/workflows/test_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,14 @@ jobs:
cp config/database.yml.ci config/database.yml
- name: Build assets
run: bundle exec rake javascript:build
- name: Set up database
run: bundle exec rails db:migrate
- name: Set up databases
run: bundle exec rails parallel:setup
- name: Install chromedriver
uses: nanasess/setup-chromedriver@v2
- name: Run chromedriver
run: chromedriver --port=9515 --whitelisted-ips &
- name: Run rspec tests
run: bundle exec rspec
run: bundle exec rails "parallel:spec[spec/, --exclude-pattern spec/system/**/*_spec.rb]"
env:
MARKUS__PYTHON: ./venv/bin/python3
- name: Run rspec system tests
Expand Down
4 changes: 4 additions & 0 deletions .rspec_parallel
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
--require rails_helper

--format progress
--format ParallelTests::RSpec::RuntimeLogger --out tmp/parallel_runtime_rspec.log
7 changes: 7 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@
- Fixed spurious navigation warnings on autotest manager and starter file manager pages (#7968)

### 🔧 Internal changes
- Parallelized RSpec tests via the `parallel_tests` gem to reduce CI test suite runtime (#7972)
- Added `NOT NULL` constraints and presence/inclusion validators flagged by `active_record_doctor` checks `missing_non_null_constraint` and `missing_presence_validation` (#7965)
- Refactored `Result#generate_print_pdf` to use Dir.mktmpdir instead of `Fileutils.mkdir_p` (#7964)
- Added tests for `MarksGradersController` to achieve full test coverage for `randomly_assign` (#7947)
- Refactored `AuthenticationHelper#sign_in` to set session values directly instead of going through `MainController#login` (#7962)
- Updated `MainController` specs to dispatch `post :login` directly in tests that assert on login's response, instead of relying on `sign_in`'s internal request (#7962)
- Added variable to enable simplecov in `spec_helper.rb` if and only if COVERAGE=true (#7960)
- Fixed flaky test `can bulk assign duplicated TAs to grade entry students` in `/spec/models/grade_entry_student_spec.rb` (#7958)
- Added tests for `GroupsController` to fully cover `global_actions` (#7955)
- Added tests for `graders_controller` to fully cover `grader_criteria_mapping` function (#7949)
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ group :test do
gem 'factory_bot_rails'
gem 'fuubar'
gem 'machinist', '< 3'
gem 'parallel_tests'
gem 'rails-controller-testing'
gem 'shoulda-callback-matchers', '~> 1.1.1'
gem 'shoulda-context', '~> 3.0.0.rc1'
Expand Down
4 changes: 4 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ GEM
racc (~> 1.4)
observer (0.1.2)
ostruct (0.6.3)
parallel (1.28.0)
parallel_tests (5.7.0)
parallel
parser (3.3.7.4)
ast (~> 2.4.1)
racc
Expand Down Expand Up @@ -549,6 +552,7 @@ DEPENDENCIES
machinist (< 3)
marcel
mini_mime
parallel_tests
pg
pghero
pluck_to_hash
Expand Down
2 changes: 1 addition & 1 deletion config/database.yml.ci
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ test:
host: localhost
port: 5432
encoding: unicode
database: markus_test
database: markus_test<%= ENV['TEST_ENV_NUMBER'] %>
username: postgres
password: postgres
#
Expand Down
Loading