Skip to content

Commit

Permalink
Upgrade to 0.28 (#40)
Browse files Browse the repository at this point in the history
* Upgrade to 0.28

* Upgraded views and styles

* Upgraded admin view

* Upgraded tests and fixed views

* Add codecov step

* Remove CODECOV env variable while running specs

---------

Co-authored-by: Fran Bolívar <[email protected]>
  • Loading branch information
alexrlpz and fblupi authored May 9, 2024
1 parent 157ce9f commit 1a3d320
Show file tree
Hide file tree
Showing 43 changed files with 968 additions and 793 deletions.
32 changes: 25 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
name: "[CI] Lint"

on:
push:
branches:
- main
pull_request:

env:
RUBY_VERSION: 3.0.2
RUBY_VERSION: 3.1.1
NODE_VERSION: 18.17.1

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

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

- name: Lint and Rubocop
run: |
bundle exec rubocop -P
bundle exec erblint app/**/*.erb
- uses: actions/setup-node@master
with:
node-version: ${{ env.NODE_VERSION }}

- run: npm ci
name: Install JS deps

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

- run: bundle exec mdl *.md
name: Lint Markdown files

- run: bundle exec erblint app/**/*.erb
name: Lint ERB files

- run: npm run stylelint
name: Lint SCSS files

- run: npm run lint
name: Lint JS files
12 changes: 9 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ on:
pull_request:

env:
RUBY_VERSION: 3.0.2
RUBY_VERSION: 3.1.1
NODE_VERSION: 18.17.1

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

services:
postgres:
Expand Down Expand Up @@ -43,7 +44,12 @@ jobs:
run: bundle exec rake test_app

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

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- uses: actions/upload-artifact@v2-preview
if: always()
Expand Down
13 changes: 13 additions & 0 deletions .mdl_style.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

all

exclude_rule "first-line-h1"

exclude_rule "line-length"

exclude_rule "no-bare-urls"

exclude_rule "no-inline-html"

rule "no-trailing-punctuation", punctuation: ".,;:!"
1 change: 1 addition & 0 deletions .mdlrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
style ".mdl_style.rb"
14 changes: 12 additions & 2 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,9 +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/**/*"
- "**/vendor/**/*"
3 changes: 3 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FactoryBot/FactoryAssociationWithStrategy:
Exclude:
- "lib/decidim/social_crowdfunding/test/factories.rb"
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.2
3.1.1
11 changes: 5 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,21 @@ source "https://rubygems.org"

ruby RUBY_VERSION

DECIDIM_VERSION = "0.27.2"
DECIDIM_VERSION = "0.28.0"

gem "decidim", DECIDIM_VERSION
gem "decidim-social_crowdfunding", path: "."

gem "bootsnap", "~> 1.4"

gem "puma", ">= 5.0.0"
gem "uglifier", "~> 4.1"
gem "puma", ">= 6.3.1"

gem "faker", "~> 2.14"
gem "faker"

group :development, :test do
gem "byebug", "~> 11.0", platform: :mri

gem "decidim-dev", DECIDIM_VERSION
gem "mdl"
end

group :development do
Expand All @@ -28,7 +27,7 @@ group :development do
gem "rubocop-faker"
gem "spring", "~> 2.0"
gem "spring-watcher-listen", "~> 2.0"
gem "web-console", "~> 3.5"
gem "web-console", "~> 4.2"
end

group :test do
Expand Down
Loading

0 comments on commit 1a3d320

Please sign in to comment.