File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88jobs :
99 rspec :
10- runs-on : ubuntu-24.04
10+ runs-on : ubuntu-latest
1111 services :
1212 postgres :
1313 image : postgres:17
1414 env :
15+ POSTGRES_USER : postgres
1516 POSTGRES_PASSWORD : password
1617 ports :
1718 - 5432:5432
2021 env :
2122 # Do not install production/staging-only gems in test environment
2223 BUNDLE_WITHOUT : " production staging"
24+ DB_HOST : localhost
2325 DB_USER : postgres
2426 DB_PASSWORD : password
25- RAILS_ENV : test
26- RUBY_ENV : test
2727 # TODO: This should not be required, but a few specs rely on it by using ENV.fetch.
2828 CANVAS_URL : https://ucberkeleysandbox.instructure.com
2929 CC_TEST_REPORTER_ID : ${{ secrets.CC_TEST_REPORTER_ID }}
Original file line number Diff line number Diff line change 1- name : RuboCop
1+ name : Checks
22
33on :
44 push :
55 pull_request :
66 workflow_dispatch :
77
88jobs :
9- scan :
9+ brakeman :
1010 runs-on : ubuntu-latest
1111 env :
1212 # Do not install production/staging-only gems in test environment
Original file line number Diff line number Diff line change @@ -32,9 +32,9 @@ def show
3232 end
3333
3434 @assignments = if @role == 'student'
35- Assignment . where ( course_to_lms_id : course_to_lms . id , enabled : true ) . order ( :name )
35+ Assignment . where ( course_to_lms_id : course_to_lms . id , enabled : true ) . order ( :name )
3636 else
37- Assignment . where ( course_to_lms_id : course_to_lms . id ) . order ( :name )
37+ Assignment . where ( course_to_lms_id : course_to_lms . id ) . order ( :name )
3838 end
3939 render_role_based_view
4040 end
Original file line number Diff line number Diff line change 22require 'spec_helper'
33ENV [ 'RAILS_ENV' ] ||= 'test'
44
5+ # Ensure there is always a CANVAS_URL present.
6+ # This is somewhat of an anti-pattern.
7+ ENV [ 'CANVAS_URL' ] ||= 'https://ucberkeleysandbox.instructure.com'
8+
59require_relative '../config/environment'
610
711# Prevent database truncation if the environment is production
Original file line number Diff line number Diff line change 3333 # Exclude accessibility tests by default
3434 config . filter_run_excluding :a11y
3535
36+ config . before do
37+ # Ensure there is always a CANVAS_URL present.
38+ # This is somewhat of an anti-pattern.
39+ ENV [ 'CANVAS_URL' ] ||= 'https://ucberkeleysandbox.instructure.com'
40+ end
3641 # rspec-expectations config goes here. You can use an alternate
3742 # assertion/expectation library such as wrong or the stdlib/minitest
3843 # assertions if you prefer.
You can’t perform that action at this time.
0 commit comments