Commit 0a681ea5 authored by Kaspar Vollenweider's avatar Kaspar Vollenweider

Merge branch 'deploy_to_production' into 'master'

Deploy to production

See merge request !1066
parents 151c9e58 195cdcba
Pipeline #88729 passed with stage
in 14 minutes and 57 seconds
app/assets/javascripts/js.cookie.js
app/assets/javascripts/bootstrap-treeview.js
{
"env": {
"browser": true,
"commonjs": false,
"es6": true,
"node": false,
"jquery": true
},
"parserOptions": {
"ecmaFeatures": {
"jsx": false
},
"sourceType": "script"
},
"rules": {
"prettier/prettier": [
"error",
{
"singleQuote": true,
"parser": "flow"
}
],
"no-const-assign": "warn",
"no-this-before-super": "warn",
"no-undef": "warn",
"no-unreachable": "warn",
"no-unused-vars": "warn",
"constructor-super": "warn",
"valid-typeof": "warn"
},
"plugins": [
"prettier"
],
"extends": [
"defaults",
"prettier"
]
}
---
plugins:
- prettier
extends:
- prettier
- standard
env:
browser: true
commonjs: false
es6: true
node: false
jquery: true
parserOptions:
sourceType: script
ecmaVersion: 2018
globals:
Routes: readonly
rules:
prettier/prettier:
- error
- singleQuote: true
parser: flow
no-const-assign: error
no-this-before-super: 'off'
no-undef: 'off'
no-unreachable: warn
no-unused-vars:
- error
- vars: local
args: after-used
ignoreRestSiblings: true
constructor-super: warn
valid-typeof: 'off'
camelcase: 'off'
comma-dangle:
- error
- arrays: always-multiline
objects: always-multiline
imports: always-multiline
exports: never
functions: never
space-before-function-paren: 'off'
......@@ -28,3 +28,11 @@ lib/access_import_test/*.xlsx
doc
/.idea
.vscode/
storage/
/public/packs
/public/packs-test
/node_modules
/yarn-error.log
yarn-debug.log*
.yarn-integrity
include:
- project: gitlab-ci/rails-testing
ref: v1
file: rails-testing.yml
image: git.panter.ch:5001/open-source/aoz-003/gitlab_ci:2.6.6
stages:
......@@ -12,56 +17,35 @@ variables:
DATABASE_URL: 'postgresql://postgres:postgres@localhost:5432/$POSTGRES_DB'
POSTGRES_HOST_AUTH_METHOD: trust
.push-pull-cache:
cache:
key: aoz-003-ruby-2-6-6
paths:
- tmp/cache/ruby
- tmp/cache/yarn
policy: pull-push
.pull-cache:
cache:
key: aoz-003-ruby-2-6-6
paths:
- tmp/cache/ruby
- tmp/cache/yarn
policy: pull
.test-extend:
lint:
stage: test
before_script:
- bundle install --without development --path tmp/cache
- yarn install --cache-folder tmp/cache/yarn
- bundle exec rails db:schema:load
.retry-dropped-runners:
retry:
max: 2
when:
- runner_system_failure
- stuck_or_timeout_failure
- job_execution_timeout
- scheduler_failure
- stale_schedule
extends:
- .cache-pull-push
- .retry-dropped-runners
- .bundle-yarn-install-webdrivers-chrome
script:
- bundle exec rails db:schema:load # some RuboCop cops require it
- yarn lint:js
- yarn lint:css
- bundle exec rubocop
test:
stage: test
extends:
- .push-pull-cache
- .test-extend
- .cache-pull
- .retry-dropped-runners
- .bundle-yarn-install
script:
- bundle exec rails db:schema:load
- bundle exec rails test
system:
stage: test
extends:
- .pull-cache
- .test-extend
- .cache-pull
- .retry-dropped-runners
- .bundle-yarn-install-webdrivers-chrome
- .capybara-screenshot-artifacts
script:
- bundle exec rails db:schema:load
- bundle exec rails test:system
artifacts:
paths:
- tmp/screenshots
when: on_failure
expire_in: 1 week
lts/erbium
if Rails.env.development? || Rails.env.test?
# This introduces the `table` statement
# rubocop:disable Style/MixinUsage
extend Hirb::Console
# rubocop:enable Style/MixinUsage
end
inherit_from: .rubocop_todo.yml
require:
- rubocop-rails
- rubocop-performance
......@@ -5,13 +7,17 @@ require:
AllCops:
Exclude:
- 'db/schema.rb'
- 'db/migrate/*'
- 'bin/*'
- 'db/migrate/*'
- 'db/schema.rb'
- 'doc/**/*'
- 'tmp/**/*'
- vendor/**/*
- Rakefile
- config/boot.rb
- Rakefile
- vendor/**/*
- lib/access_import/**/*
- 'node_modules/**/*'
- 'lib/tasks/active_storage.rake'
DisplayCopNames: true
DisplayStyleGuide: true
ExtraDetails: true
......@@ -28,43 +34,99 @@ Rails/RefuteMethods:
Metrics/AbcSize:
Exclude:
- test/**/*
- app/controllers/application_controller.rb
- app/controllers/assignments_controller.rb
- app/controllers/billing_expenses_controller.rb
- app/controllers/clients_controller.rb
- app/controllers/departments_controller.rb
- app/controllers/feedbacks_controller.rb
- app/controllers/group_assignments_controller.rb
- app/controllers/group_offers_controller.rb
- app/controllers/hours_controller.rb
- app/controllers/semester_process_volunteers_controller.rb
- app/controllers/semester_processes_controller.rb
- app/controllers/users_controller.rb
- app/controllers/volunteers_controller.rb
- app/inputs/date_range_picker_input.rb
- app/inputs/date_year_range_picker_input.rb
- app/models/certificate.rb
- app/models/performance_report.rb
- app/models/reminder_mailing_volunteer.rb
- app/models/semester_process_volunteer.rb
- config/**/*
- db/seeds.rb
Max: 25
- test/**/*
IgnoredMethods:
- boolean_toggler_filter_dropdown
- build_nested_objects
- custom_filter_dropdown_filters
- dates_semester_start
- document_js_nodes
- handle_semester_feedback_quote
- in_feedbackable?
- last_submitted_hours_and_feedbacks
- selected_billing_semester
- set_journaled
- take_responsibility
- td_truncate_content_modal
- validate_group_assignment_or_assignment_present
Metrics/ClassLength:
Exclude:
- app/controllers/assignments_controller.rb
- app/models/user.rb
- app/models/volunteer.rb
- app/policies/application_policy.rb
- test/**/*
Max: 150
Metrics/MethodLength:
Exclude:
- test/**/*
- db/seeds.rb
Max: 20
ExcludedMethods:
- update_or_create
- document_js_nodes
- volunteers_stats
- create_all_assignments
- create_semester_processes
- setup
Metrics/BlockLength:
Exclude:
- 'test/system/*'
- 'db/seeds.rb'
- 'config/routes.rb'
- '**/*.xlsx.axlsx'
- config/initializers/**/*
- db/seeds.rb
- lib/tasks/**/*
- test/system/terminate_volunteers_test.rb
ExcludedMethods:
- included # for concerns
- draw # for routes
- define # for FactoryBot
- draw # for routes
- factory
- included # for concerns
- test
- configure
Lint/RaiseException:
Enabled: true
Lint/StructNewOverride:
Enabled: true
Naming/MethodName:
EnforcedStyle: snake_case
Exclude:
- config/initializers/ransack.rb
Layout/FirstArrayElementIndentation:
Enabled: true
EnforcedStyle: consistent
Layout/FirstHashElementIndentation:
Enabled: true
EnforcedStyle: consistent
Layout/FirstParameterIndentation:
Layout/FirstArgumentIndentation:
Enabled: true
EnforcedStyle: consistent
Exclude:
- app/controllers/assignments_controller.rb
- app/controllers/group_assignments_controller.rb
Layout/HashAlignment:
EnforcedLastArgumentHashStyle: always_inspect
Layout/MultilineMethodCallIndentation:
......@@ -98,7 +160,8 @@ Layout/LineLength:
# The IgnoredPatterns option is a list of !ruby/regexp and/or string
# elements. Strings will be converted to Regexp objects. A line that matches
# any regular expression listed in this option will be ignored by LineLength.
IgnoredPatterns: []
IgnoredPatterns:
- !ruby/regexp /^\s*\# .*/
Style/Alias:
Enabled: false
......
This diff is collapsed.
scss_files: "**/*.scss"
plugin_directories: ['.scss-linters']
plugin_gems: []
severity: warning
linters:
BangFormat:
enabled: true
space_before_bang: true
space_after_bang: false
BemDepth:
enabled: false
max_elements: 1
BorderZero:
enabled: true
convention: zero
ChainedClasses:
enabled: false
ColorKeyword:
enabled: true
ColorVariable:
enabled: true
Comment:
enabled: true
style: silent
DebugStatement:
enabled: true
DeclarationOrder:
enabled: true
DisableLinterReason:
enabled: false
DuplicateProperty:
enabled: true
ElsePlacement:
enabled: true
style: same_line
EmptyLineBetweenBlocks:
enabled: true
ignore_single_line_blocks: true
EmptyRule:
enabled: true
ExtendDirective:
enabled: false
FinalNewline:
enabled: true
present: true
HexLength:
enabled: true
style: short
HexNotation:
enabled: true
style: lowercase
HexValidation:
enabled: true
IdSelector:
enabled: true
ImportantRule:
enabled: true
ImportPath:
enabled: true
leading_underscore: false
filename_extension: false
Indentation:
enabled: true
allow_non_nested_indentation: false
character: space
width: 2
LeadingZero:
enabled: true
style: exclude_zero
MergeableSelector:
enabled: true
force_nesting: true
NameFormat:
enabled: true
allow_leading_underscore: true
convention: hyphenated_lowercase
NestingDepth:
enabled: true
max_depth: 3
ignore_parent_selectors: false
PlaceholderInExtend:
enabled: true
PrivateNamingConvention:
enabled: false
prefix: _
PropertyCount:
enabled: false
include_nested: false
max_properties: 10
PropertySortOrder:
enabled: true
ignore_unspecified: false
min_properties: 2
separate_groups: false
PropertySpelling:
enabled: true
extra_properties: []
disabled_properties: []
PropertyUnits:
enabled: true
global: [
'ch', 'em', 'ex', 'rem',
'cm', 'in', 'mm', 'pc', 'pt', 'px', 'q',
'vh', 'vw', 'vmin', 'vmax',
'deg', 'grad', 'rad', 'turn',
'ms', 's',
'Hz', 'kHz',
'dpi', 'dpcm', 'dppx',
'%']
properties: {}
PseudoElement:
enabled: true
QualifyingElement:
enabled: true
allow_element_with_attribute: false
allow_element_with_class: false
allow_element_with_id: false
SelectorDepth:
enabled: true
max_depth: 3
SelectorFormat:
enabled: true
convention: hyphenated_lowercase
Shorthand:
enabled: true
allowed_shorthands: [1, 2, 3, 4]
SingleLinePerProperty:
enabled: true
allow_single_line_rule_sets: true
SingleLinePerSelector:
enabled: true
SpaceAfterComma:
enabled: true
style: one_space
SpaceAfterComment:
enabled: false
style: one_space
allow_empty_comments: true
SpaceAfterPropertyColon:
enabled: true
style: one_space
SpaceAfterPropertyName:
enabled: true
SpaceAfterVariableColon:
enabled: false
style: one_space
SpaceAfterVariableName:
enabled: true
SpaceAroundOperator:
enabled: true
style: one_space
SpaceBeforeBrace:
enabled: true
style: space
allow_single_line_padding: false
SpaceBetweenParens:
enabled: true
spaces: 0
StringQuotes:
enabled: true
style: single_quotes
TrailingSemicolon:
enabled: true
TrailingWhitespace:
enabled: true
TrailingZero:
enabled: false
TransitionAll:
enabled: false
UnnecessaryMantissa:
enabled: true
UnnecessaryParentReference:
enabled: true
UrlFormat:
enabled: true
UrlQuotes:
enabled: true
VariableForProperty:
enabled: false
properties: []
VendorPrefix:
enabled: true
identifier_list: base
additional_identifiers: []
excluded_identifiers: []
ZeroUnit:
enabled: true
Compass::*:
enabled: false
---
plugins:
- stylelint-prettier
extends:
- stylelint-config-suitcss
- stylelint-prettier/recommended
rules:
prettier/prettier:
- true
- singleQuote: true
tabWidth: 2
at-rule-empty-line-before:
- always
- except:
- blockless-after-same-name-blockless
- blockless-after-blockless
- after-same-name