Skip to content
Merged
Show file tree
Hide file tree
Changes from 18 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
26 changes: 6 additions & 20 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended"
],
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
"extends": "@decidim",
"rules": {
"no-invalid-this": "off"
},
"globals": {
"$": false,
"jQuery": false,
"L": false,
"ApiFetcher": false,
"FormStorage": false,
"Quill": false,
"InscrybMDE": false,
"inlineAttachment": false
},
"rules": {
"Calendar": "readonly",
"timeGridPlugin": "readonly",
"dayGridPlugin": "readonly"
}
}
23 changes: 17 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ on:
pull_request:

env:
RUBY_VERSION: 3.1.1
RUBY_VERSION: 3.2.2
NODE_VERSION: 18.17.1

jobs:
lint-report:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
Expand All @@ -20,7 +21,17 @@ jobs:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true

- name: Lint and Rubocop
run: |
bundle exec rubocop -P
bundle exec erblint app/**/*.erb
- run: npm ci
name: Install JS deps

- run: npm run lint
name: Lint JS files

- run: npm run stylelint
name: Lint SCSS files

- run: bundle exec rubocop -P
name: Lint Ruby files

- run: bundle exec erblint app/**/*.erb
name: Lint ERB files
18 changes: 14 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ on:
pull_request:

env:
RUBY_VERSION: 3.1.1
RUBY_VERSION: 3.2.2
DISABLE_SPRING: 1
NODE_VERSION: 18.17.1

jobs:
test-report:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

services:
postgres:
Expand All @@ -27,6 +28,7 @@ jobs:
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: postgres
DATABASE_HOST: localhost
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

steps:
- uses: actions/checkout@v2
Expand All @@ -37,14 +39,22 @@ jobs:
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true

- run: |
sudo apt install imagemagick

- name: Install JS dependencies
run: npm ci

- name: Setup Database
run: bundle exec rake test_app

- name: Run RSpec
run: SIMPLECOV=1 CODECOV=1 bundle exec rake
run: bundle exec rspec
env:
CI: 1

- uses: actions/upload-artifact@v2-preview
- uses: actions/upload-artifact@v4
if: always()
with:
name: screenshots
Expand Down
19 changes: 12 additions & 7 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
inherit_from: https://raw.githubusercontent.com/decidim/decidim/release/0.27-stable/.rubocop.yml
inherit_from: .rubocop_todo.yml

inherit_gem:
decidim-dev: rubocop-decidim.yml

inherit_mode:
merge:
- Exclude

AllCops:
Include:
Expand All @@ -8,14 +15,12 @@ AllCops:
- "**/Gemfile"
- "**/Rakefile"
Exclude:
- "development_app/**/*"
- "spec/decidim_dummy_app/**/*"
- "**/spec/decidim_dummy_app/**/*"
- "bin/**/*"
- "node_modules/**/*"
- "**/node_modules/**/*"
- "db/schema.rb"
- "db/migrate/*"
- "vendor/**/*"

RSpec/DescribeClass:
Exclude:
- "spec/*"
- "spec/system/*"
- "**/vendor/**/*"
87 changes: 0 additions & 87 deletions .rubocop_rails.yml

This file was deleted.

Loading
Loading