forked from AjuntamentdeBarcelona/decidim-module-kids
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b919a2d
commit 4e5c55e
Showing
49 changed files
with
3,518 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
version: "2" | ||
|
||
checks: | ||
argument-count: | ||
enabled: false | ||
|
||
complex-logic: | ||
enabled: false | ||
|
||
file-lines: | ||
enabled: false | ||
|
||
identical-code: | ||
enabled: false | ||
|
||
method-complexity: | ||
enabled: false | ||
|
||
method-count: | ||
enabled: false | ||
|
||
method-lines: | ||
enabled: false | ||
|
||
nested-control-flow: | ||
enabled: false | ||
|
||
return-statements: | ||
enabled: false | ||
|
||
similar-code: | ||
enabled: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--exclude-exts=.min.css | ||
--ignore=adjoining-classes,box-model,ids,order-alphabetical,unqualified-attributes |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
|
||
linters: | ||
ExtraNewline: | ||
enabled: true | ||
|
||
FinalNewline: | ||
enabled: true | ||
|
||
SpaceAroundErbTag: | ||
enabled: true | ||
|
||
AllowedScriptType: | ||
enabled: true | ||
allowed_types: | ||
- text/javascript | ||
- text/template | ||
|
||
Rubocop: | ||
enabled: true | ||
|
||
rubocop_config: | ||
AllCops: | ||
DisabledByDefault: true | ||
|
||
Style/StringLiterals: | ||
EnforcedStyle: double_quotes | ||
|
||
Layout/SpaceInsideHashLiteralBraces: | ||
Enabled: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
**/*{.,-}min.js | ||
decidim-*/vendor/**/*.js | ||
spec/decidim_dummy_app/**/*.js | ||
development_app | ||
**/node_modules/** | ||
bundle.js | ||
karma.conf.js | ||
webpack.config.js | ||
webpack.config.babel.js | ||
entry.test.js | ||
entry.js | ||
*_manifest.js | ||
coverage | ||
decidim-dev/**/*/test/**/*.js | ||
vendor/bundle |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "@decidim" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: "[CI] Lint" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
env: | ||
RUBY_VERSION: 3.1.1 | ||
|
||
jobs: | ||
lint-report: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- uses: actions/setup-node@master | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- run: npm ci | ||
name: Install JS deps | ||
|
||
- run: npm run lint | ||
name: Lint JS files | ||
|
||
- run: npm run stylelint | ||
name: Lint SCSS files | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ env.RUBY_VERSION }} | ||
bundler-cache: true | ||
|
||
- run: bundle exec rubocop -P | ||
name: Lint Ruby files | ||
|
||
- run: bundle exec erblint app/**/*.erb | ||
name: Lint ERB files |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: "[CI] Test" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
env: | ||
RUBY_VERSION: 3.1.1 | ||
|
||
jobs: | ||
test-report: | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
postgres: | ||
image: postgres:11 | ||
ports: ["5432:5432"] | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
env: | ||
POSTGRES_PASSWORD: postgres | ||
env: | ||
DATABASE_USERNAME: postgres | ||
DATABASE_PASSWORD: postgres | ||
DATABASE_HOST: localhost | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ env.RUBY_VERSION }} | ||
bundler-cache: true | ||
|
||
- name: Setup Database | ||
run: bundle exec rake test_app | ||
|
||
- name: Run RSpec | ||
run: bundle exec rspec | ||
env: | ||
SIMPLECOV: 1 | ||
CODECOV: 1 | ||
|
||
- uses: actions/upload-artifact@v2-preview | ||
if: always() | ||
with: | ||
name: screenshots | ||
path: ./spec/decidim_dummy_app/tmp/screenshots |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/.bundle/ | ||
/.yardoc | ||
/_yardoc/ | ||
/coverage/ | ||
/doc/ | ||
/pkg/ | ||
/spec/reports/ | ||
/tmp/ | ||
|
||
# rspec failure tracking | ||
.rspec-failures | ||
|
||
# env configuration files | ||
.env | ||
.envrc | ||
.rbenv-vars | ||
|
||
# default test application | ||
spec/decidim_dummy_app | ||
|
||
# default development application | ||
development_app | ||
|
||
.vscode | ||
.byebug_history | ||
*.gem | ||
node_modules/ | ||
npm_debug.log |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--format documentation | ||
--color | ||
--require spec_helper |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Style/OpenStructUse: | ||
Enabled: false | ||
|
||
Gemspec/RequireMFA: | ||
Enabled: false | ||
|
||
Naming/MemoizedInstanceVariableName: | ||
Enabled: false | ||
|
||
RSpec/VerifiedDoubleReference: | ||
Enabled: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
inherit_from: | ||
- .rubocop_ruby.yml | ||
- .rubocop_rails.yml | ||
- .rubocop-disabled.yml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
require: rubocop-rails | ||
|
||
Rails: | ||
Enabled: true | ||
|
||
Rails/ActionFilter: | ||
Include: | ||
- decidim-*/app/controllers/**/*.rb | ||
|
||
Rails/ContentTag: | ||
Enabled: false | ||
|
||
Rails/CreateTableWithTimestamps: | ||
Enabled: false | ||
|
||
Rails/EnumUniqueness: | ||
Include: | ||
- decidim-*/app/models/**/*.rb | ||
|
||
Rails/Exit: | ||
Include: | ||
- decidim-*/app/**/*.rb | ||
- decidim-*/config/**/*.rb | ||
- decidim-*/lib/**/*.rb | ||
Exclude: | ||
- decidim-*/lib/**/*.rake | ||
|
||
Rails/FindBy: | ||
Include: | ||
- "**/*.rb" | ||
|
||
Rails/FindEach: | ||
Include: | ||
- decidim-*/app/models/**/*.rb | ||
|
||
Rails/HasAndBelongsToMany: | ||
Include: | ||
- decidim-*/app/models/**/*.rb | ||
|
||
Rails/HasManyOrHasOneDependent: | ||
Include: | ||
- decidim-*/app/models/**/*.rb | ||
|
||
Rails/InverseOf: | ||
Enabled: false | ||
|
||
Rails/LexicallyScopedActionFilter: | ||
Include: | ||
- decidim-*/app/controllers/**/*.rb | ||
|
||
Rails/NotNullColumn: | ||
Enabled: false | ||
|
||
Rails/Output: | ||
Include: | ||
- decidim-*/app/**/*.rb | ||
- decidim-*/config/**/*.rb | ||
- decidim-*/db/**/*.rb | ||
- decidim-*/lib/**/*.rb | ||
Exclude: | ||
- decidim-core/db/seeds.rb | ||
- decidim-core/lib/decidim/core.rb | ||
- decidim-core/lib/decidim/component_manifest.rb | ||
- decidim-core/lib/decidim/participatory_space_manifest.rb | ||
- decidim-system/db/seeds.rb | ||
- decidim-templates/db/seeds.rb | ||
|
||
Rails/OutputSafety: | ||
Enabled: false | ||
|
||
Rails/Pluck: | ||
Enabled: false | ||
|
||
Rails/RakeEnvironment: | ||
Enabled: false | ||
|
||
Rails/ReadWriteAttribute: | ||
Include: | ||
- decidim-*/app/models/**/*.rb | ||
|
||
Rails/ReversibleMigration: | ||
Enabled: false | ||
|
||
Rails/ScopeArgs: | ||
Include: | ||
- decidim-*/app/models/**/*.rb | ||
|
||
Rails/SkipsModelValidations: | ||
Enabled: true | ||
|
||
Rails/Validation: | ||
Include: | ||
- decidim-*/app/models/**/*.rb |
Oops, something went wrong.