diff --git a/.decidim-version b/.decidim-version index 166c9e29b70b1..12a91df0e0b30 100644 --- a/.decidim-version +++ b/.decidim-version @@ -1 +1 @@ -0.25.2 +0.26.4 diff --git a/.github/actions/module-rspec/action.yml b/.github/actions/module-rspec/action.yml new file mode 100644 index 0000000000000..2ad1e16db6896 --- /dev/null +++ b/.github/actions/module-rspec/action.yml @@ -0,0 +1,58 @@ +name: '[CI] Module rspec' +description: 'Test module with rspec' +inputs: + name: + description: 'Module Name' + required: true + github_token: + description: 'Github token' + required: true + ruby-version: + description: 'Ruby Version' + default: "2.7.5" + required: false + node-version: + description: 'Node version' + default: '16.9.1' + required: false + +runs: + using: "composite" + steps: + - uses: rokroskar/workflow-run-cleanup-action@v0.3.3 + if: "github.ref != 'refs/heads/develop'" + env: + GITHUB_TOKEN: " ${{ inputs.github_token }}" + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ inputs.ruby-version }} + bundler-cache: true + - uses: actions/setup-node@v1 + with: + node-version: ${{ inputs.node-version }} + - name: Get npm cache directory path + id: npm-cache-dir-path + run: echo "::set-output name=dir::$(npm get cache)-${{ inputs.name }}" + shell: "bash" + - uses: actions/cache@v2 + id: npm-cache + with: + path: ${{ steps.npm-cache-dir-path.outputs.dir }} + key: npm-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + npm- + - run: bundle exec rake test_app + name: Create test app + shell: "bash" + - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots + name: Create the screenshots folder + shell: "bash" + - uses: nanasess/setup-chromedriver@v1.0.1 + - run: RAILS_ENV=test bundle exec rails assets:precompile + name: Precompile assets + working-directory: ./spec/decidim_dummy_app/ + shell: "bash" + - run: bundle exec brakeman --rails6 --force-scan . + name: Scanning Security issues on module + working-directory: ${{ inputs.name }} + shell: "bash" diff --git a/.github/workflows/ci_accountability.yml b/.github/workflows/ci_accountability.yml index 9bfe96e837f49..5b9916af2b891 100644 --- a/.github/workflows/ci_accountability.yml +++ b/.github/workflows/ci_accountability.yml @@ -23,15 +23,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-accountability jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -45,47 +44,28 @@ jobs: --health-retries 5 env: POSTGRES_PASSWORD: postgres + validator: + image: ghcr.io/validator/validator:latest + ports: ["8888:8888"] env: DATABASE_USERNAME: postgres DATABASE_PASSWORD: postgres DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' + VALIDATOR_HTML_URI: http://localhost:8888/ steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: bundle exec rspec name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_admin.yml b/.github/workflows/ci_admin.yml index ba5c69bfdc65b..2851d6f87c63c 100644 --- a/.github/workflows/ci_admin.yml +++ b/.github/workflows/ci_admin.yml @@ -1,4 +1,4 @@ -name: "[CI] Admin" +name: "[CI] Admin (unit tests)" on: push: branches: @@ -18,15 +18,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-admin jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -46,41 +45,18 @@ jobs: DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ - - run: bundle exec rspec + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} + - run: bundle exec rspec --exclude-pattern 'spec/system/**/*_spec.rb' name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_admin_system_1.yml b/.github/workflows/ci_admin_system_1.yml new file mode 100644 index 0000000000000..260b6342b38b3 --- /dev/null +++ b/.github/workflows/ci_admin_system_1.yml @@ -0,0 +1,75 @@ +name: "[CI] Admin (system tests 1)" +on: + push: + branches: + - develop + - release/* + - "*-stable" + pull_request: + branches-ignore: + - "chore/l10n*" + paths: + - "*" + - ".github/**" + - "decidim-admin/**" + - "decidim-core/**" + - "decidim-dev/**" + - "decidim-participatory_processes/**" + +env: + CI: "true" + RUBY_VERSION: 2.7.5 + NODE_VERSION: 16.9.1 + DECIDIM_MODULE: decidim-admin + +jobs: + main: + name: Tests + runs-on: ubuntu-20.04 + if: "!startsWith(github.head_ref, 'chore/l10n')" + timeout-minutes: 60 + 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 + validator: + image: ghcr.io/validator/validator:latest + ports: ["8888:8888"] + env: + DATABASE_USERNAME: postgres + DATABASE_PASSWORD: postgres + DATABASE_HOST: localhost + RUBYOPT: '-W:no-deprecated' + VALIDATOR_HTML_URI: http://localhost:8888/ + steps: + - uses: actions/checkout@v2.0.0 + with: + fetch-depth: 1 + - uses: ./.github/actions/module-rspec + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} + - run: | + count=$(ls spec/system/*_spec.rb | wc -l | tr -d ' ') + half=$(expr $count / 2) + list_of_files=$(ls spec/system/*_spec.rb | sed -n "1,$(echo $half)p" | xargs) + bundle exec rspec $list_of_files + name: RSpec + working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" + - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH + name: Upload coverage + - uses: actions/upload-artifact@v2 + if: always() + with: + name: screenshots + path: ./spec/decidim_dummy_app/tmp/screenshots + if-no-files-found: ignore diff --git a/.github/workflows/ci_admin_system_2.yml b/.github/workflows/ci_admin_system_2.yml new file mode 100644 index 0000000000000..4fea30c920bee --- /dev/null +++ b/.github/workflows/ci_admin_system_2.yml @@ -0,0 +1,71 @@ +name: "[CI] Admin (system tests 2)" +on: + push: + branches: + - develop + - release/* + - "*-stable" + pull_request: + branches-ignore: + - "chore/l10n*" + paths: + - "*" + - ".github/**" + - "decidim-admin/**" + - "decidim-core/**" + - "decidim-dev/**" + - "decidim-participatory_processes/**" + +env: + CI: "true" + RUBY_VERSION: 2.7.5 + NODE_VERSION: 16.9.1 + DECIDIM_MODULE: decidim-admin + +jobs: + main: + name: Tests + runs-on: ubuntu-20.04 + if: "!startsWith(github.head_ref, 'chore/l10n')" + timeout-minutes: 60 + 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 + RUBYOPT: '-W:no-deprecated' + steps: + - uses: actions/checkout@v2.0.0 + with: + fetch-depth: 1 + - uses: ./.github/actions/module-rspec + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} + - run: | + count=$(ls spec/system/*_spec.rb | wc -l | tr -d ' ') + half=$(expr $count / 2) + list_of_files=$(ls spec/system/*_spec.rb | sed -n "$(expr $half + 1), $(echo $count)p" | xargs) + bundle exec rspec $list_of_files + name: RSpec + working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" + - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH + name: Upload coverage + - uses: actions/upload-artifact@v2 + if: always() + with: + name: screenshots + path: ./spec/decidim_dummy_app/tmp/screenshots + if-no-files-found: ignore diff --git a/.github/workflows/ci_api.yml b/.github/workflows/ci_api.yml index 6585d9da5fd69..b74bc376cba6d 100644 --- a/.github/workflows/ci_api.yml +++ b/.github/workflows/ci_api.yml @@ -19,15 +19,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-api jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -47,41 +46,18 @@ jobs: DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: bundle exec rspec name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_assemblies.yml b/.github/workflows/ci_assemblies.yml index 1ce6b01521a3c..2b1cfdebcf777 100644 --- a/.github/workflows/ci_assemblies.yml +++ b/.github/workflows/ci_assemblies.yml @@ -18,15 +18,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-assemblies jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -40,47 +39,28 @@ jobs: --health-retries 5 env: POSTGRES_PASSWORD: postgres + validator: + image: ghcr.io/validator/validator:latest + ports: ["8888:8888"] env: DATABASE_USERNAME: postgres DATABASE_PASSWORD: postgres DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' + VALIDATOR_HTML_URI: http://localhost:8888/ steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: bundle exec rspec name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_blogs.yml b/.github/workflows/ci_blogs.yml index 52f0576cec5a6..325afedc45462 100644 --- a/.github/workflows/ci_blogs.yml +++ b/.github/workflows/ci_blogs.yml @@ -21,15 +21,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-blogs jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -43,47 +42,28 @@ jobs: --health-retries 5 env: POSTGRES_PASSWORD: postgres + validator: + image: ghcr.io/validator/validator:latest + ports: ["8888:8888"] env: DATABASE_USERNAME: postgres DATABASE_PASSWORD: postgres DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' + VALIDATOR_HTML_URI: http://localhost:8888/ steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: bundle exec rspec name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_budgets.yml b/.github/workflows/ci_budgets.yml index e0c9925c5007d..d42cb042f9bf9 100644 --- a/.github/workflows/ci_budgets.yml +++ b/.github/workflows/ci_budgets.yml @@ -20,15 +20,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-budgets jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -42,47 +41,28 @@ jobs: --health-retries 5 env: POSTGRES_PASSWORD: postgres + validator: + image: ghcr.io/validator/validator:latest + ports: ["8888:8888"] env: DATABASE_USERNAME: postgres DATABASE_PASSWORD: postgres DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' + VALIDATOR_HTML_URI: http://localhost:8888/ steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: bundle exec rspec name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_comments.yml b/.github/workflows/ci_comments.yml index 685035d40a168..cae48432a1f4c 100644 --- a/.github/workflows/ci_comments.yml +++ b/.github/workflows/ci_comments.yml @@ -18,15 +18,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-comments jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -40,51 +39,28 @@ jobs: --health-retries 5 env: POSTGRES_PASSWORD: postgres + validator: + image: ghcr.io/validator/validator:latest + ports: ["8888:8888"] env: DATABASE_USERNAME: postgres DATABASE_PASSWORD: postgres DATABASE_HOST: localhost RUBYOPT: "-W:no-deprecated" + VALIDATOR_HTML_URI: http://localhost:8888/ steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - name: Install JS dependencies - run: npm ci - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ - - run: npm run test - name: Test JS files + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: bundle exec rspec name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_conferences.yml b/.github/workflows/ci_conferences.yml index 2ff815ae716e6..d424f7220c616 100644 --- a/.github/workflows/ci_conferences.yml +++ b/.github/workflows/ci_conferences.yml @@ -19,15 +19,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-conferences jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -41,47 +40,28 @@ jobs: --health-retries 5 env: POSTGRES_PASSWORD: postgres + validator: + image: ghcr.io/validator/validator:latest + ports: ["8888:8888"] env: DATABASE_USERNAME: postgres DATABASE_PASSWORD: postgres DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' + VALIDATOR_HTML_URI: http://localhost:8888/ steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: bundle exec rspec name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_consultations.yml b/.github/workflows/ci_consultations.yml index 665d42cb64892..4824fc15a8f5b 100644 --- a/.github/workflows/ci_consultations.yml +++ b/.github/workflows/ci_consultations.yml @@ -19,15 +19,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-consultations jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -41,47 +40,28 @@ jobs: --health-retries 5 env: POSTGRES_PASSWORD: postgres + validator: + image: ghcr.io/validator/validator:latest + ports: ["8888:8888"] env: DATABASE_USERNAME: postgres DATABASE_PASSWORD: postgres DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' + VALIDATOR_HTML_URI: http://localhost:8888/ steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: bundle exec rspec name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_core_lib.yml b/.github/workflows/ci_core_lib.yml new file mode 100644 index 0000000000000..f2b5e5766eab0 --- /dev/null +++ b/.github/workflows/ci_core_lib.yml @@ -0,0 +1,66 @@ +name: "[CI] Core (lib specs)" +on: + push: + branches: + - develop + - release/* + - "*-stable" + pull_request: + branches-ignore: + - "chore/l10n*" + paths: + - "*" + - ".github/**" + - "decidim-api/**" + - "decidim-core/**" + - "decidim-dev/**" + +env: + CI: "true" + RUBY_VERSION: 2.7.5 + NODE_VERSION: 16.9.1 + DECIDIM_MODULE: decidim-core + +jobs: + main: + name: Tests + runs-on: ubuntu-20.04 + if: "!startsWith(github.head_ref, 'chore/l10n')" + timeout-minutes: 60 + 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 + RUBYOPT: '-W:no-deprecated' + steps: + - uses: actions/checkout@v2.0.0 + with: + fetch-depth: 1 + - uses: ./.github/actions/module-rspec + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} + - run: bundle exec rspec spec/lib + name: RSpec + working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" + - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH + name: Upload coverage + - uses: actions/upload-artifact@v2 + if: always() + with: + name: screenshots + path: ./spec/decidim_dummy_app/tmp/screenshots + if-no-files-found: ignore diff --git a/.github/workflows/ci_core_system.yml b/.github/workflows/ci_core_system.yml index bcf088a2b6654..7f8a56f6bb8d0 100644 --- a/.github/workflows/ci_core_system.yml +++ b/.github/workflows/ci_core_system.yml @@ -17,15 +17,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-core jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -39,47 +38,28 @@ jobs: --health-retries 5 env: POSTGRES_PASSWORD: postgres + validator: + image: ghcr.io/validator/validator:latest + ports: ["8888:8888"] env: DATABASE_USERNAME: postgres DATABASE_PASSWORD: postgres DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' + VALIDATOR_HTML_URI: http://localhost:8888/ steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: bundle exec rspec spec/system name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_core_unit.yml b/.github/workflows/ci_core_unit.yml index 5063b1bac1346..6364021bb915d 100644 --- a/.github/workflows/ci_core_unit.yml +++ b/.github/workflows/ci_core_unit.yml @@ -17,15 +17,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-core jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -45,41 +44,18 @@ jobs: DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ - - run: bundle exec rspec --exclude-pattern 'spec/system/**/*_spec.rb' + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} + - run: bundle exec rspec --exclude-pattern 'spec/{system,lib}/**/*_spec.rb' name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_debates.yml b/.github/workflows/ci_debates.yml index 62b4244f6849a..2e68aa6acae7b 100644 --- a/.github/workflows/ci_debates.yml +++ b/.github/workflows/ci_debates.yml @@ -19,15 +19,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-debates jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -41,47 +40,28 @@ jobs: --health-retries 5 env: POSTGRES_PASSWORD: postgres + validator: + image: ghcr.io/validator/validator:latest + ports: ["8888:8888"] env: DATABASE_USERNAME: postgres DATABASE_PASSWORD: postgres DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' + VALIDATOR_HTML_URI: http://localhost:8888/ steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: bundle exec rspec name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_dev_system.yml b/.github/workflows/ci_dev_system.yml index d27509e46fd31..9b63b096d3bc0 100644 --- a/.github/workflows/ci_dev_system.yml +++ b/.github/workflows/ci_dev_system.yml @@ -16,15 +16,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-dev jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -44,41 +43,18 @@ jobs: DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: bundle exec rspec spec/system name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_elections_system_admin_1.yml b/.github/workflows/ci_elections_system_admin_1.yml new file mode 100644 index 0000000000000..db42892332694 --- /dev/null +++ b/.github/workflows/ci_elections_system_admin_1.yml @@ -0,0 +1,90 @@ +name: "[CI] Elections (system admin 1)" +on: + push: + branches: + - develop + - release/* + - "*-stable" + pull_request: + branches-ignore: + - "chore/l10n*" + paths: + - "*" + - ".github/**" + - "decidim-admin/**" + - "decidim-bulletin_board/**" + - "decidim-core/**" + - "decidim-dev/**" + - "decidim-elections/**" + - "decidim-forms/**" + - "decidim-proposals/**" + +env: + CI: "true" + RUBY_VERSION: 2.7.5 + NODE_VERSION: 16.9.1 + DECIDIM_MODULE: decidim-elections + +jobs: + main: + name: Tests + runs-on: ubuntu-20.04 + if: "!startsWith(github.head_ref, 'chore/l10n')" + timeout-minutes: 60 + 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 + validator: + image: ghcr.io/validator/validator:latest + ports: ["8888:8888"] + bulletin_board: + image: codegram/decidim-bulletin-board:0.22.3 + ports: ["8000:8000"] + env: + DATABASE_URL: postgresql://postgres:postgres@postgres/bb + RAILS_ENV: test + SEED: 1 + IDENTIFICATION_PRIVATE_KEY: '{"kty":"RSA","n":"zMXsZpYPKkDlSmezX898y7zNOaJ7ENIN4kj4UhQ95Vm4HlgTpIs2VMMsO0eqynMaOR_G1mXdqbpbaJtXijBe4V8323QwGm6WVAa71E7pDXa5g6-uo5f8GePitN0YER9y2yNQN4uTaNzJiWV2uLBUYfMdj3SIif31YwLULHAOj3B_oleFK8coE_Qr3NzATcYBmsqE8AR4NljxTO6KDmP1SLdf5GBOBhOAIFbnL_Kpj2xkm7MS3hjMVKpiRhqA1UgX5oKZ8ixBv46fNJF0pBsHi3fHNjK9oZzgdx_AI-YFpdE_40-8bh_g9sWzxacqOM2-MdQLHbvRPEVltO3E8tr6I5YWrylcP7l9VD8OJeqjq2qFYHnGYdmLoD2XuXmI9EuBvSb9H4-qcartxZSIQCimKib_fxZvgrG1FSRRhK6YpvIdGv4-G2zfCCRsC4XD80TYI2bf-oYCoy7eU3_eVHFMV2yg4p1Wnuw2Vgq0edPL_bKaV9JvGx7F-U5juxNN0WZR9LzbPl4ReejzN95lyHgbj0nTH_u3bSpZmgJrQF-PwdnPcG46deVjJgUeosrlC4lQxVrRz0GL58BuFunnz2uYDBDrcJCiG60EbdkAFHjOcXU4wrUWATin7je_aqdBXhSnkTafcJAMvL7Y2Ld7vDge8nLqjAVlAi5am3rN0kqKT6M","e":"AQAB","kid":"a8e86f02ca27e1861bfc49e2a9a4614ca9068f8efdb6d42d19d3aab0eb2a31be"}' + DISABLE_DATABASE_ENVIRONMENT_CHECK: 1 + RAILS_SERVE_STATIC_FILES: enabled + DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL: true + env: + DATABASE_USERNAME: postgres + DATABASE_PASSWORD: postgres + DATABASE_HOST: localhost + RUBYOPT: "-W:no-deprecated" + VALIDATOR_HTML_URI: http://localhost:8888/ + ELECTIONS_BULLETIN_BOARD_SERVER: http://localhost:8000/api + steps: + - uses: actions/checkout@v2.0.0 + with: + fetch-depth: 1 + - uses: ./.github/actions/module-rspec + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} + - run: | + count=$(ls spec/system/admin/*_spec.rb | wc -l | tr -d ' ') + half=$(expr $count / 2) + list_of_files=$(ls spec/system/admin/*_spec.rb | sed -n "1,$(echo $half)p" | xargs) + bundle exec rspec $list_of_files + name: RSpec + working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" + - run: ./.github/upload_coverage.sh decidim-elections-system-admin $GITHUB_EVENT_PATH + name: Upload coverage + - uses: actions/upload-artifact@v2 + if: always() + with: + name: screenshots + path: ./spec/decidim_dummy_app/tmp/screenshots + if-no-files-found: ignore diff --git a/.github/workflows/ci_elections_system_admin.yml b/.github/workflows/ci_elections_system_admin_2.yml similarity index 67% rename from .github/workflows/ci_elections_system_admin.yml rename to .github/workflows/ci_elections_system_admin_2.yml index 29192600dc0fc..9e00e1479709f 100644 --- a/.github/workflows/ci_elections_system_admin.yml +++ b/.github/workflows/ci_elections_system_admin_2.yml @@ -1,4 +1,4 @@ -name: "[CI] Elections (system admin)" +name: "[CI] Elections (system admin 2)" on: push: branches: @@ -21,8 +21,7 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-elections @@ -44,7 +43,7 @@ jobs: env: POSTGRES_PASSWORD: postgres bulletin_board: - image: codegram/decidim-bulletin-board:0.21.1 + image: codegram/decidim-bulletin-board:0.22.3 ports: ["8000:8000"] env: DATABASE_URL: postgresql://postgres:postgres@postgres/bb @@ -61,41 +60,22 @@ jobs: RUBYOPT: "-W:no-deprecated" ELECTIONS_BULLETIN_BOARD_SERVER: http://localhost:8000/api steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: bundle exec rspec spec/system/admin + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} + - run: | + count=$(ls spec/system/admin/*_spec.rb | wc -l | tr -d ' ') + half=$(expr $count / 2) + list_of_files=$(ls spec/system/admin/*_spec.rb | sed -n "$(expr $half + 1), $(echo $count)p" | xargs) + bundle exec rspec $list_of_files name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh decidim-elections-system-admin $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_elections_system_public.yml b/.github/workflows/ci_elections_system_public.yml index 673b3708f21a5..b3ee2724f3c2f 100644 --- a/.github/workflows/ci_elections_system_public.yml +++ b/.github/workflows/ci_elections_system_public.yml @@ -21,15 +21,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-elections jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -43,8 +42,11 @@ jobs: --health-retries 5 env: POSTGRES_PASSWORD: postgres + validator: + image: ghcr.io/validator/validator:latest + ports: ["8888:8888"] bulletin_board: - image: codegram/decidim-bulletin-board:0.21.1 + image: codegram/decidim-bulletin-board:0.22.3 ports: ["8000:8000"] env: DATABASE_URL: postgresql://postgres:postgres@postgres/bb @@ -59,43 +61,21 @@ jobs: DATABASE_PASSWORD: postgres DATABASE_HOST: localhost RUBYOPT: "-W:no-deprecated" + VALIDATOR_HTML_URI: http://localhost:8888/ ELECTIONS_BULLETIN_BOARD_SERVER: http://localhost:8000/api steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ - - uses: nanasess/setup-chromedriver@v1.0.1 + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: bundle exec rspec spec/system/ --exclude-pattern 'spec/system/admin/**/*_spec.rb' name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh decidim-elections-system-public $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_elections_unit_tests.yml b/.github/workflows/ci_elections_unit_tests.yml index 04b483b26d12a..fc10cc94236d9 100644 --- a/.github/workflows/ci_elections_unit_tests.yml +++ b/.github/workflows/ci_elections_unit_tests.yml @@ -21,15 +21,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-elections jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -44,7 +43,7 @@ jobs: env: POSTGRES_PASSWORD: postgres bulletin_board: - image: codegram/decidim-bulletin-board:0.21.1 + image: codegram/decidim-bulletin-board:0.22.3 ports: ["8000:8000"] env: DATABASE_URL: postgresql://postgres:postgres@postgres/bb @@ -61,41 +60,18 @@ jobs: RUBYOPT: "-W:no-deprecated" ELECTIONS_BULLETIN_BOARD_SERVER: http://localhost:8000/api steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ - - uses: nanasess/setup-chromedriver@v1.0.1 + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: bundle exec rspec --exclude-pattern 'spec/system/**/*_spec.rb' name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_forms.yml b/.github/workflows/ci_forms.yml index 206a324bb2691..607012f7d2e02 100644 --- a/.github/workflows/ci_forms.yml +++ b/.github/workflows/ci_forms.yml @@ -18,15 +18,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-forms jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -46,41 +45,18 @@ jobs: DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: bundle exec rspec name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_generators.yml b/.github/workflows/ci_generators.yml index 18200ac3872e5..ce4a8c3ba456b 100644 --- a/.github/workflows/ci_generators.yml +++ b/.github/workflows/ci_generators.yml @@ -16,15 +16,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-generators jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -44,7 +43,7 @@ jobs: DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 + - uses: rokroskar/workflow-run-cleanup-action@v0.3.3 if: "github.ref != 'refs/heads/develop'" env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" @@ -71,8 +70,13 @@ jobs: - run: bundle install --jobs 4 --retry 3 name: Install Ruby deps working-directory: ${{ env.DECIDIM_MODULE }} + - run: bundle exec brakeman --rails6 --force-scan . + name: Scanning Security issues on module + working-directory: ${{ env.DECIDIM_MODULE }} - run: bundle exec rspec name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH name: Upload coverage diff --git a/.github/workflows/ci_initiatives.yml b/.github/workflows/ci_initiatives.yml index c6a0d76c35b1a..2280c67b736ab 100644 --- a/.github/workflows/ci_initiatives.yml +++ b/.github/workflows/ci_initiatives.yml @@ -1,4 +1,4 @@ -name: "[CI] Initiatives" +name: "[CI] Initiatives (unit tests)" on: push: branches: @@ -20,15 +20,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-initiatives jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -48,41 +47,18 @@ jobs: DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ - - run: bundle exec rspec + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} + - run: bundle exec rspec --exclude-pattern 'spec/system/**/*_spec.rb' name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_initiatives_system_admin.yml b/.github/workflows/ci_initiatives_system_admin.yml new file mode 100644 index 0000000000000..53c81faafdbcb --- /dev/null +++ b/.github/workflows/ci_initiatives_system_admin.yml @@ -0,0 +1,73 @@ +name: "[CI] Initiatives (system admin)" +on: + push: + branches: + - develop + - release/* + - "*-stable" + pull_request: + branches-ignore: + - "chore/l10n*" + paths: + - "*" + - ".github/**" + - "decidim-admin/**" + - "decidim-comments/**" + - "decidim-core/**" + - "decidim-dev/**" + - "decidim-initiatives/**" + - "decidim-verifications/**" + +env: + CI: "true" + RUBY_VERSION: 2.7.5 + NODE_VERSION: 16.9.1 + DECIDIM_MODULE: decidim-initiatives + +jobs: + main: + name: Tests + runs-on: ubuntu-20.04 + if: "!startsWith(github.head_ref, 'chore/l10n')" + timeout-minutes: 60 + 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 + validator: + image: ghcr.io/validator/validator:latest + ports: ["8888:8888"] + env: + DATABASE_USERNAME: postgres + DATABASE_PASSWORD: postgres + DATABASE_HOST: localhost + RUBYOPT: '-W:no-deprecated' + VALIDATOR_HTML_URI: http://localhost:8888/ + steps: + - uses: actions/checkout@v2.0.0 + with: + fetch-depth: 1 + - uses: ./.github/actions/module-rspec + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} + - run: bundle exec rspec spec/system/admin + name: RSpec + working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" + - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH + name: Upload coverage + - uses: actions/upload-artifact@v2 + if: always() + with: + name: screenshots + path: ./spec/decidim_dummy_app/tmp/screenshots + if-no-files-found: ignore diff --git a/.github/workflows/ci_initiatives_system_public.yml b/.github/workflows/ci_initiatives_system_public.yml new file mode 100644 index 0000000000000..e0a6648b2259a --- /dev/null +++ b/.github/workflows/ci_initiatives_system_public.yml @@ -0,0 +1,73 @@ +name: "[CI] Initiatives (system public)" +on: + push: + branches: + - develop + - release/* + - "*-stable" + pull_request: + branches-ignore: + - "chore/l10n*" + paths: + - "*" + - ".github/**" + - "decidim-admin/**" + - "decidim-comments/**" + - "decidim-core/**" + - "decidim-dev/**" + - "decidim-initiatives/**" + - "decidim-verifications/**" + +env: + CI: "true" + RUBY_VERSION: 2.7.5 + NODE_VERSION: 16.9.1 + DECIDIM_MODULE: decidim-initiatives + +jobs: + main: + name: Tests + runs-on: ubuntu-20.04 + if: "!startsWith(github.head_ref, 'chore/l10n')" + timeout-minutes: 60 + 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 + validator: + image: ghcr.io/validator/validator:latest + ports: ["8888:8888"] + env: + DATABASE_USERNAME: postgres + DATABASE_PASSWORD: postgres + DATABASE_HOST: localhost + RUBYOPT: '-W:no-deprecated' + VALIDATOR_HTML_URI: http://localhost:8888/ + steps: + - uses: actions/checkout@v2.0.0 + with: + fetch-depth: 1 + - uses: ./.github/actions/module-rspec + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} + - run: bundle exec rspec spec/system/ --exclude-pattern 'spec/system/admin/**/*_spec.rb' + name: RSpec + working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" + - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH + name: Upload coverage + - uses: actions/upload-artifact@v2 + if: always() + with: + name: screenshots + path: ./spec/decidim_dummy_app/tmp/screenshots + if-no-files-found: ignore diff --git a/.github/workflows/ci_main.yml b/.github/workflows/ci_main.yml index b754366dd2df7..36ef1772f1fe8 100644 --- a/.github/workflows/ci_main.yml +++ b/.github/workflows/ci_main.yml @@ -11,17 +11,16 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 timeout-minutes: 60 steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 + - uses: rokroskar/workflow-run-cleanup-action@v0.3.3 if: "github.ref != 'refs/heads/develop'" env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" @@ -49,3 +48,5 @@ jobs: run: npm ci - run: bundle exec rspec name: RSpec + env: + SIMPLECOV: "true" diff --git a/.github/workflows/ci_meetings_system_admin.yml b/.github/workflows/ci_meetings_system_admin.yml index 0f4addb057bb8..11ba9ff9f01c9 100644 --- a/.github/workflows/ci_meetings_system_admin.yml +++ b/.github/workflows/ci_meetings_system_admin.yml @@ -21,15 +21,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-meetings jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -43,47 +42,28 @@ jobs: --health-retries 5 env: POSTGRES_PASSWORD: postgres + validator: + image: ghcr.io/validator/validator:latest + ports: ["8888:8888"] env: DATABASE_USERNAME: postgres DATABASE_PASSWORD: postgres DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' + VALIDATOR_HTML_URI: http://localhost:8888/ steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: bundle exec rspec spec/system/admin name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh decidim-meetings-system-admin $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_meetings_system_public_1.yml b/.github/workflows/ci_meetings_system_public_1.yml new file mode 100644 index 0000000000000..ba7aaf643db14 --- /dev/null +++ b/.github/workflows/ci_meetings_system_public_1.yml @@ -0,0 +1,78 @@ +name: "[CI] Meetings (system public 1)" +on: + push: + branches: + - develop + - release/* + - "*-stable" + pull_request: + branches-ignore: + - "chore/l10n*" + paths: + - "*" + - ".github/**" + - "decidim-admin/**" + - "decidim-assemblies/**" + - "decidim-core/**" + - "decidim-dev/**" + - "decidim-forms/**" + - "decidim-meetings/**" + - "decidim-participatory_processes/**" + +env: + CI: "true" + RUBY_VERSION: 2.7.5 + NODE_VERSION: 16.9.1 + DECIDIM_MODULE: decidim-meetings + +jobs: + main: + name: Tests + runs-on: ubuntu-20.04 + if: "!startsWith(github.head_ref, 'chore/l10n')" + timeout-minutes: 60 + 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 + validator: + image: ghcr.io/validator/validator:latest + ports: ["8888:8888"] + env: + DATABASE_USERNAME: postgres + DATABASE_PASSWORD: postgres + DATABASE_HOST: localhost + RUBYOPT: '-W:no-deprecated' + VALIDATOR_HTML_URI: http://localhost:8888/ + steps: + - uses: actions/checkout@v2.0.0 + with: + fetch-depth: 1 + - uses: ./.github/actions/module-rspec + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} + - run: | + count=$(ls spec/system/*_spec.rb | wc -l | tr -d ' ') + half=$(expr $count / 2) + list_of_files=$(ls spec/system/*_spec.rb | sed -n "1,$(echo $half)p" | xargs) + bundle exec rspec $list_of_files + name: RSpec + working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" + - run: ./.github/upload_coverage.sh decidim-meetings-system-public $GITHUB_EVENT_PATH + name: Upload coverage + - uses: actions/upload-artifact@v2 + if: always() + with: + name: screenshots + path: ./spec/decidim_dummy_app/tmp/screenshots + if-no-files-found: ignore diff --git a/.github/workflows/ci_meetings_system_public.yml b/.github/workflows/ci_meetings_system_public_2.yml similarity index 53% rename from .github/workflows/ci_meetings_system_public.yml rename to .github/workflows/ci_meetings_system_public_2.yml index 0c0b4a60d71fd..3e7e08bfa6007 100644 --- a/.github/workflows/ci_meetings_system_public.yml +++ b/.github/workflows/ci_meetings_system_public_2.yml @@ -1,4 +1,4 @@ -name: "[CI] Meetings (system public)" +name: "[CI] Meetings (system public 2)" on: push: branches: @@ -21,8 +21,7 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-meetings @@ -49,41 +48,22 @@ jobs: DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ - - run: bundle exec rspec spec/system/ --exclude-pattern 'spec/system/admin/**/*_spec.rb' + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} + - run: | + count=$(ls spec/system/*_spec.rb | wc -l | tr -d ' ') + half=$(expr $count / 2) + list_of_files=$(ls spec/system/*_spec.rb | sed -n "$(expr $half + 1), $(echo $count)p" | xargs) + bundle exec rspec $list_of_files name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh decidim-meetings-system-public $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_meetings_unit_tests.yml b/.github/workflows/ci_meetings_unit_tests.yml index 0d42cb44026bd..65223a0fb1712 100644 --- a/.github/workflows/ci_meetings_unit_tests.yml +++ b/.github/workflows/ci_meetings_unit_tests.yml @@ -21,15 +21,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-meetings jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -49,41 +48,18 @@ jobs: DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: bundle exec rspec --exclude-pattern 'spec/system/**/*_spec.rb' name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_pages.yml b/.github/workflows/ci_pages.yml index 3477df644cfa3..dfe045b831392 100644 --- a/.github/workflows/ci_pages.yml +++ b/.github/workflows/ci_pages.yml @@ -18,15 +18,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-pages jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -40,47 +39,28 @@ jobs: --health-retries 5 env: POSTGRES_PASSWORD: postgres + validator: + image: ghcr.io/validator/validator:latest + ports: ["8888:8888"] env: DATABASE_USERNAME: postgres DATABASE_PASSWORD: postgres DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' + VALIDATOR_HTML_URI: http://localhost:8888/ steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: bundle exec rspec name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_participatory_processes.yml b/.github/workflows/ci_participatory_processes.yml index b6dbc8f2fbe3b..c7fb39309078c 100644 --- a/.github/workflows/ci_participatory_processes.yml +++ b/.github/workflows/ci_participatory_processes.yml @@ -19,15 +19,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-participatory_processes jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -41,47 +40,28 @@ jobs: --health-retries 5 env: POSTGRES_PASSWORD: postgres + validator: + image: ghcr.io/validator/validator:latest + ports: ["8888:8888"] env: DATABASE_USERNAME: postgres DATABASE_PASSWORD: postgres DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' + VALIDATOR_HTML_URI: http://localhost:8888/ steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: bundle exec rspec name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_proposals_system_admin.yml b/.github/workflows/ci_proposals_system_admin.yml index 16794c6c527c6..50717bb43a7a6 100644 --- a/.github/workflows/ci_proposals_system_admin.yml +++ b/.github/workflows/ci_proposals_system_admin.yml @@ -23,15 +23,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-proposals jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -45,47 +44,28 @@ jobs: --health-retries 5 env: POSTGRES_PASSWORD: postgres + validator: + image: ghcr.io/validator/validator:latest + ports: ["8888:8888"] env: DATABASE_USERNAME: postgres DATABASE_PASSWORD: postgres DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' + VALIDATOR_HTML_URI: http://localhost:8888/ steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: bundle exec rspec spec/system/admin name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh decidim-proposals-system-admin $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_proposals_system_public_1.yml b/.github/workflows/ci_proposals_system_public_1.yml index e400dd45b74b2..d551f91fe0186 100644 --- a/.github/workflows/ci_proposals_system_public_1.yml +++ b/.github/workflows/ci_proposals_system_public_1.yml @@ -23,15 +23,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-proposals jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -45,44 +44,23 @@ jobs: --health-retries 5 env: POSTGRES_PASSWORD: postgres + validator: + image: ghcr.io/validator/validator:latest + ports: ["8888:8888"] env: DATABASE_USERNAME: postgres DATABASE_PASSWORD: postgres DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' + VALIDATOR_HTML_URI: http://localhost:8888/ steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: | count=$(ls spec/system/*_spec.rb | wc -l | tr -d ' ') half=$(expr $count / 2) @@ -90,6 +68,8 @@ jobs: bundle exec rspec $list_of_files name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh decidim-proposals-system-public $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_proposals_system_public_2.yml b/.github/workflows/ci_proposals_system_public_2.yml index dfeea2a12419a..616d06902c8b0 100644 --- a/.github/workflows/ci_proposals_system_public_2.yml +++ b/.github/workflows/ci_proposals_system_public_2.yml @@ -23,8 +23,7 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-proposals @@ -51,38 +50,13 @@ jobs: DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: | count=$(ls spec/system/*_spec.rb | wc -l | tr -d ' ') half=$(expr $count / 2) @@ -90,6 +64,8 @@ jobs: bundle exec rspec $list_of_files name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh decidim-proposals-system-public $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_proposals_unit_tests.yml b/.github/workflows/ci_proposals_unit_tests.yml index 050168de20749..31cc0d03148cb 100644 --- a/.github/workflows/ci_proposals_unit_tests.yml +++ b/.github/workflows/ci_proposals_unit_tests.yml @@ -23,15 +23,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-proposals jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -51,41 +50,18 @@ jobs: DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: bundle exec rspec --exclude-pattern 'spec/system/**/*_spec.rb' name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_sortitions.yml b/.github/workflows/ci_sortitions.yml index 009318137e8a9..d3723609188fb 100644 --- a/.github/workflows/ci_sortitions.yml +++ b/.github/workflows/ci_sortitions.yml @@ -20,15 +20,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-sortitions jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -42,47 +41,28 @@ jobs: --health-retries 5 env: POSTGRES_PASSWORD: postgres + validator: + image: ghcr.io/validator/validator:latest + ports: ["8888:8888"] env: DATABASE_USERNAME: postgres DATABASE_PASSWORD: postgres DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' + VALIDATOR_HTML_URI: http://localhost:8888/ steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: bundle exec rspec name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_surveys.yml b/.github/workflows/ci_surveys.yml index f77d10256bd08..17f34a2303087 100644 --- a/.github/workflows/ci_surveys.yml +++ b/.github/workflows/ci_surveys.yml @@ -21,15 +21,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-surveys jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -43,47 +42,28 @@ jobs: --health-retries 5 env: POSTGRES_PASSWORD: postgres + validator: + image: ghcr.io/validator/validator:latest + ports: ["8888:8888"] env: DATABASE_USERNAME: postgres DATABASE_PASSWORD: postgres DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' + VALIDATOR_HTML_URI: http://localhost:8888/ steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: bundle exec rspec name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_system.yml b/.github/workflows/ci_system.yml index 3bed5e6bf22ce..e4b464a31a492 100644 --- a/.github/workflows/ci_system.yml +++ b/.github/workflows/ci_system.yml @@ -17,15 +17,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-system jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -39,47 +38,28 @@ jobs: --health-retries 5 env: POSTGRES_PASSWORD: postgres + validator: + image: ghcr.io/validator/validator:latest + ports: ["8888:8888"] env: DATABASE_USERNAME: postgres DATABASE_PASSWORD: postgres DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' + VALIDATOR_HTML_URI: http://localhost:8888/ steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: bundle exec rspec name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_templates.yml b/.github/workflows/ci_templates.yml index 6fc2340a66653..c8dd390a95df8 100644 --- a/.github/workflows/ci_templates.yml +++ b/.github/workflows/ci_templates.yml @@ -20,15 +20,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-templates jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -42,47 +41,28 @@ jobs: --health-retries 5 env: POSTGRES_PASSWORD: postgres + validator: + image: ghcr.io/validator/validator:latest + ports: ["8888:8888"] env: DATABASE_USERNAME: postgres DATABASE_PASSWORD: postgres DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' + VALIDATOR_HTML_URI: http://localhost:8888/ steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@master - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: bundle exec rspec name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/ci_verifications.yml b/.github/workflows/ci_verifications.yml index 9cff15756c746..a62bc1b42b7df 100644 --- a/.github/workflows/ci_verifications.yml +++ b/.github/workflows/ci_verifications.yml @@ -18,15 +18,14 @@ on: env: CI: "true" - SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 DECIDIM_MODULE: decidim-verifications jobs: main: name: Tests - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 services: @@ -40,47 +39,28 @@ jobs: --health-retries 5 env: POSTGRES_PASSWORD: postgres + validator: + image: ghcr.io/validator/validator:latest + ports: ["8888:8888"] env: DATABASE_USERNAME: postgres DATABASE_PASSWORD: postgres DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' + VALIDATOR_HTML_URI: http://localhost:8888/ steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 - if: "github.ref != 'refs/heads/develop'" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - uses: actions/checkout@v2.0.0 with: fetch-depth: 1 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler-cache: true - - uses: actions/setup-node@v1 + - uses: ./.github/actions/module-rspec with: - node-version: ${{ env.NODE_VERSION }} - - name: Get npm cache directory path - id: npm-cache-dir-path - run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}" - - uses: actions/cache@v2 - id: npm-cache - with: - path: ${{ steps.npm-cache-dir-path.outputs.dir }} - key: npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - npm- - - run: bundle exec rake test_app - name: Create test app - - run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots - name: Create the screenshots folder - - uses: nanasess/setup-chromedriver@v1.0.1 - - run: RAILS_ENV=test bundle exec rails assets:precompile - name: Precompile assets - working-directory: ./spec/decidim_dummy_app/ + github_token: ${{ secrets.GITHUB_TOKEN }} + name: ${{ env.DECIDIM_MODULE }} - run: bundle exec rspec name: RSpec working-directory: ${{ env.DECIDIM_MODULE }} + env: + SIMPLECOV: "true" - run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH name: Upload coverage - uses: actions/upload-artifact@v2 diff --git a/.github/workflows/lint_code.yml b/.github/workflows/lint_code.yml index 05c956387f6de..78f4f048bc1b3 100644 --- a/.github/workflows/lint_code.yml +++ b/.github/workflows/lint_code.yml @@ -1,4 +1,4 @@ -name: "[CI] Lint" +name: "[CI] Lint code" on: push: branches: @@ -12,17 +12,17 @@ on: env: CI: "true" SIMPLECOV: "true" - RUBY_VERSION: 2.7.1 + RUBY_VERSION: 2.7.5 NODE_VERSION: 16.9.1 jobs: lint: name: Lint code - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 steps: - - uses: rokroskar/workflow-run-cleanup-action@v0.3.0 + - uses: rokroskar/workflow-run-cleanup-action@v0.3.3 if: "github.ref != 'refs/heads/develop'" env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/lint_pr_format.yml b/.github/workflows/lint_pr_format.yml new file mode 100644 index 0000000000000..bcf58f8b8ad86 --- /dev/null +++ b/.github/workflows/lint_pr_format.yml @@ -0,0 +1,22 @@ +name: "[CI] Lint PR format" +on: + pull_request: + branches-ignore: + - "chore/l10n*" + types: [opened, edited, synchronize, reopened] + +jobs: + check_title: + name: Check PR title + runs-on: ubuntu-20.04 + steps: + - uses: rokroskar/workflow-run-cleanup-action@v0.3.3 + if: "github.ref != 'refs/heads/develop'" + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + - uses: deepakputhraya/action-pr-title@master + with: + disallowed_prefixes: "feat,chore,build,ci,refactor,docs,wip" + prefix_case_sensitive: false + min_length: 5 + max_length: 100 diff --git a/.github/workflows/on_docs_update.yml b/.github/workflows/on_docs_update.yml index 2a497a96273bd..b1f2d60381f2e 100644 --- a/.github/workflows/on_docs_update.yml +++ b/.github/workflows/on_docs_update.yml @@ -9,7 +9,7 @@ on: jobs: trigger_documentation_build: name: Trigger decidim/documentation build - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 timeout-minutes: 60 steps: - name: Send dispatch for trigger_build workflow diff --git a/.github/workflows/on_release.yml b/.github/workflows/on_release.yml index 303f649cc1bf7..5e0be24ad03f0 100644 --- a/.github/workflows/on_release.yml +++ b/.github/workflows/on_release.yml @@ -6,7 +6,7 @@ on: jobs: trigger_docker_build: name: Trigger decidim/docker build - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 timeout-minutes: 60 steps: - name: Send dispatch for Docker Hub build diff --git a/.ruby-version b/.ruby-version index 860487ca19ced..a603bb50a29e3 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.7.1 +2.7.5 diff --git a/.simplecov b/.simplecov index 18cc4ce39998f..76114887f8c90 100644 --- a/.simplecov +++ b/.simplecov @@ -1,6 +1,9 @@ # frozen_string_literal: true if ENV["SIMPLECOV"] + test_env = ENV.fetch("TEST_ENV_NUMBER", "") + test_env = "1" if test_env.empty? + SimpleCov.start do # `ENGINE_ROOT` holds the name of the engine we're testing. # This brings us to the main Decidim folder. @@ -24,6 +27,7 @@ if ENV["SIMPLECOV"] end SimpleCov.merge_timeout 1800 + SimpleCov.coverage_dir "coverage/#{test_env}/" if ENV["CI"] require "simplecov-cobertura" diff --git a/CHANGELOG.md b/CHANGELOG.md index dc21320c3d06f..c8656efbdc20f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -224,110 +224,429 @@ Nothing. #### Statistics change As per [\#8147](https://github.com/decidim/decidim/pull/8147), the participants stats will not take into account deleted and blocked users. +Nothing. -#### Webpacker migration -As per [#7464](https://github.com/decidim/decidim/pull/7464), [#7733](https://github.com/decidim/decidim/pull/7733) Decidim has been upgraded to use Webpacker to manage its assets. It's a huge change that requires some updates in your applications. Please refer to the guide [Migrate to Webpacker an instance app](https://github.com/decidim/decidim/blob/develop/docs/modules/develop/pages/guide_migrate_webpacker_app.adoc) and follow the steps described. +## [0.26.4](https://github.com/decidim/decidim/tree/v0.26.4) -#### Improved menu api -As per [\#7368](https://github.com/decidim/decidim/pull/7368), [\#7382](https://github.com/decidim/decidim/pull/7382) the entire admin structure has been migrated from menus being rendered in partials, to the existing menu structure. Before, this change adding a new menu item to an admin submenu required partial override. +### Added -As per [\#7545](https://github.com/decidim/decidim/pull/7545) the menu api has been enhanced to support removal of elements and reordering. All the menu items have an identifier that allow any developer to interact without overriding the entire menu structure. As a result of this change, the old ```menu.item``` function has been deprecated in favour of a more verbose version ```menu.add_item ```, of which first argument is the menu identifier. +Nothing. -Example on adding new elements to a menu: -```ruby -Decidim.menu :menu do |menu| - menu.add_item :root, - I18n.t("menu.home", scope: "decidim"), - decidim.root_path, - position: 1, - active: :exclusive - - menu.add_item :pages, - I18n.t("menu.help", scope: "decidim"), - decidim.pages_path, - position: 7, - active: :inclusive -end -``` +### Changed -Example Customizing the elements of a menu: +Nothing. -```ruby -Decidim.menu :menu do |menu| - # Completely remove a menu item - menu.remove_item :my_item - - # Change the items order - menu.move :root, after: :pages - # alternative - menu.move :pages, before: :root -end -``` +### Fixed + +- **decidim-core**: Backport 'Prevent the account edit route through Devise' to v0.26 [\#9932](https://github.com/decidim/decidim/pull/9932) +- **decidim-participatory processes**: Backport 'Fix unpublished processes shown in the group process count' to v0.26 [\#9934](https://github.com/decidim/decidim/pull/9934) +- **decidim-admin**: Backport 'Fix global moderation types not translated' to v0.26 [\#9937](https://github.com/decidim/decidim/pull/9937) +- **decidim-admin**: Backport 'Fix updating organization settings in case there were errors' to v0.26 [\#9938](https://github.com/decidim/decidim/pull/9938) +- **decidim-budgets**, **decidim-core**, **decidim-elections**, **decidim-proposals**: Backport 'Do not import resources multiple times' to v0.26 [\#9942](https://github.com/decidim/decidim/pull/9942) +- **decidim-forms**, **decidim-surveys**: Backport 'Fix form answer attachments breaking the answer view' to v0.26 [\#9945](https://github.com/decidim/decidim/pull/9945) +- **decidim-comments**: Backport 'Fix "disappearing" underscores with comments' to v0.26 [\#9949](https://github.com/decidim/decidim/pull/9949) +- **decidim-admin**, **decidim-core**: Backport 'Fix editor content saving when the content has only one video' to v0.26 [\#9951](https://github.com/decidim/decidim/pull/9951) +- **decidim-proposals**: Backport 'Fix collaborative drafts page when there are errors on the form' to v0.26 [\#9955](https://github.com/decidim/decidim/pull/9955) +- **decidim-debates**: Backport 'Fix the finite value on the debate form when editing an existing debate' to v0.26 [\#9957](https://github.com/decidim/decidim/pull/9957) +- **decidim-pages**: Backport 'Fix exporting and importing a page component' to v0.26 [\#9959](https://github.com/decidim/decidim/pull/9959) +- **decidim-participatory processes**: Backport 'Fix importing participatory process from legacy format' to v0.26 [\#9964](https://github.com/decidim/decidim/pull/9964) +- **decidim-assemblies**, **decidim-core**, **decidim-participatory processes**: Backport 'Fix duplicate stats on home page and participatory space main page' to v0.26 [\#9966](https://github.com/decidim/decidim/pull/9966) +- **decidim-budgets**, **decidim-core**, **decidim-proposals**, **decidim-templates**: Backport 'Address Crowdin feedback' to v0.26 [\#9970](https://github.com/decidim/decidim/pull/9970) +- **decidim-core**: Backport 'Limit invitation redirects only to paths within the application' to v0.26 [\#9973](https://github.com/decidim/decidim/pull/9973) +- **decidim-initiatives**: Backport 'Fix initiative sign if the authorization metadata is set to `nil`' to v0.26 [\#9981](https://github.com/decidim/decidim/pull/9981) +- **decidim-initiatives**: Backport 'Add missing i18n key in Initiatives' to v0.26 [\#9983](https://github.com/decidim/decidim/pull/9983) +- **decidim-core**: Backport 'Fix correct resource linking for amendments' to v0.26 [\#9988](https://github.com/decidim/decidim/pull/9988) +- **decidim-core**: Backport 'Fix user sign up with invalid name' to v0.26 [\#9991](https://github.com/decidim/decidim/pull/9991) +- **decidim-initiatives**: Backport 'Make initiatives order translatable' to v0.26 [\#9995](https://github.com/decidim/decidim/pull/9995) +- **decidim-core**: Backport 'Make ToS agreement translatable' to v0.26 [\#9997](https://github.com/decidim/decidim/pull/9997) +- **decidim-debates**: Backport 'Make Scopes field in debates translatable' to v0.26 [\#9999](https://github.com/decidim/decidim/pull/9999) +- **decidim-core**: Backport 'Remove invitations badge' to v0.26 [\#10001](https://github.com/decidim/decidim/pull/10001) +- **decidim-conferences**: Backport 'Fix conference invitations' to v0.26 [\#10004](https://github.com/decidim/decidim/pull/10004) +- **decidim-admin**, **decidim-core**: Backport 'Fix preserving bold text in the rich text editor when pasting content' to v0.26 [\#9962](https://github.com/decidim/decidim/pull/9962) +- **decidim-admin**, **decidim-assemblies**, **decidim-initiatives**, **decidim-participatory processes**, **decidim-verifications**: Backport 'Add missing active actions on admin navigation menu' to v0.26 [\#9993](https://github.com/decidim/decidim/pull/9993) +- **decidim-core**: Backport 'Fix disappearing sub-lists in rich text editors' to v0.26 [\#9968](https://github.com/decidim/decidim/pull/9968) +- **decidim-elections**: Backport 'Define the component import routes, permissions and controller at votings' to v0.26 [\#9977](https://github.com/decidim/decidim/pull/9977) +- **decidim-core**, **decidim-proposals**: Backport 'Fix proposal etiquette and length validator with base64 images' to v0.26 [\#10010](https://github.com/decidim/decidim/pull/10010) +- **decidim-core**, **decidim-debates**, **decidim-meetings**, **decidim-proposals**: Backport 'Refactor cell titles' to v0.26 [\#10041](https://github.com/decidim/decidim/pull/10041) +- **decidim-admin**, **decidim-comments**: Backport 'Fix moderations for comments that are mapped to deleted resources' to v0.26 [\#9941](https://github.com/decidim/decidim/pull/9941) +- **decidim-comments**, **decidim-core**, **decidim-verifications**: Backport 'Fix user related absolute URLs' to v0.26 [\#9947](https://github.com/decidim/decidim/pull/9947) +- **decidim-core**: Backport 'Fix duplicate user activity records when public spaces have private users' to v0.26 [\#9979](https://github.com/decidim/decidim/pull/9979) +- **decidim-meetings**: Backport 'Refactor the meeting list item title display' to v0.26 [\#10047](https://github.com/decidim/decidim/pull/10047) +- **decidim-accountability**, **decidim-admin**, **decidim-proposals**: Backport 'Reformat CSV help for import files on Accountability and Proposals' to v0.26 [\#10055](https://github.com/decidim/decidim/pull/10055) +- **decidim-system**: Backport 'Fix organization SMTP password not saved (became blank) in system panel' to v0.26 [\#10053](https://github.com/decidim/decidim/pull/10053) +- **decidim-budgets**, **decidim-elections**, **decidim-proposals**, **decidim-sortitions**: Backport 'Fix usages of `reorder` and `paginate`' to v0.26 [\#10051](https://github.com/decidim/decidim/pull/10051) +- **decidim-admin**: Backport 'Show only ToS acceptance when admin hasn't accepted it' to v0.26 [\#10057](https://github.com/decidim/decidim/pull/10057) +- **decidim-debates**, **decidim-meetings**, **decidim-proposals**: Backport 'Refactor admin listing titles' to v0.26 [\#10049](https://github.com/decidim/decidim/pull/10049) +- **decidim-core**: Backport 'Fix date/time formats at component forms' to v0.26 [\#9953](https://github.com/decidim/decidim/pull/9953) + +### Removed + +Nothing. + +### Internal + +- Backport 'Fix importing a page component without a body' to v0.26 [\#10023](https://github.com/decidim/decidim/pull/10023) -#### Meetings merge minutes and close actions +### Developer improvements -With changes introduced in [\#7968](https://github.com/decidim/decidim/pull/7968) the `Decidim::Meetings::Minutes` model and related table are removed and the attributes of the previously existing minutes are migrated to `Decidim::Meetings::Meeting` model in the `closing_report`, `video_url`, `audio_url` and `closing_visible` columns. These are the different results of the merge according to the initial data: +Nothing. -* It there was no minutes data and the meeting was not closed nothing changes -* If there was no minutes data and the meeting was closed, the meeting remains closed with the `closing_visible` attribute to true. In this way the closing data will remain visible. -* If there was minutes data and the meeting was not closed, the meeting is closed and the minutes `description` value is copied to the meeting `closing_report`, the `video_url` and `audio_url` minutes attributes values are copied to the respective meeting attributes and the minutes `visible` attribute value is copied to the meeting `closing_visible` attribute. -* If there was minutes data and the meeting was closed, the meeting remains closed and the meeting `closing_report` value remains if present. Elsewere the minutes `description` value is copied to the meeting `closing_report`. the `video_url` and `audio_url` minutes attributes values are copied to the respective meeting attributes and the minutes `visible` attribute value is copied to the meeting `closing_visible` attribute. In this case the visibility of closing report may change to false if there was a minutes with `visible` set to false. +## [0.26.3](https://github.com/decidim/decidim/tree/v0.26.3) -Please, note that if there was previously `minutes_description` and `closing_report` data for a meeting, after applying the changes of this release, the `minutes_description` data will be lost. +### Added + +Nothing. -If there is previous activity of creation or edition of minutes, `Decidim::ActionLog` instances and an associated `PaperTrail::Version` instance for each one will have been created pointing to these elements in their polymorphic associations. To avoid errors, the migration includes changing those associations to point to the meeting and changing the action to `close` in the action log items. This change is not reversible +### Changed -#### New Job queues +Nothing. -PR [\#7986](https://github.com/decidim/decidim/pull/7986) splits some jobs from the `:default` queue to two new queues: +### Fixed -- `:exports` -- `:translations` +- **decidim-core**: Backport 'Fix / Expose createMapController properly to let overriding' to v0.26 [\#9520](https://github.com/decidim/decidim/pull/9520) +- **decidim-elections**: Backport 'Capture unhandled errors from JS promises and inform the user' to v0.26 [\#9521](https://github.com/decidim/decidim/pull/9521) +- **decidim-elections**: Backport 'Remove description from questions in elections' to v0.26 [\#9522](https://github.com/decidim/decidim/pull/9522) +- **decidim-initiatives**: Backport 'Return 404 when there isn't an initiative' to v0.26 [\#9523](https://github.com/decidim/decidim/pull/9523) +- **decidim-forms**, **decidim-meetings**, **decidim-surveys**: Backport 'Fix rollback questionnaire answer when file is invalid' to v0.26 [\#9524](https://github.com/decidim/decidim/pull/9524) +- **decidim-elections**: Backport 'Make sure component is published when starting an election' to v0.26 [\#9525](https://github.com/decidim/decidim/pull/9525) +- **decidim-core**, **decidim-meetings**, **decidim-proposals**: Backport 'Fix email subject when resource title has special characters' to v0.26 [\#9526](https://github.com/decidim/decidim/pull/9526) +- **decidim-core**: Backport 'Prevent users to validate nicknames/emails taken by user groups' to v0.26 [\#9527](https://github.com/decidim/decidim/pull/9527) +- **decidim-elections**: Backport 'Fix hardcoded hour in election dashboard' to v0.26 [\#9528](https://github.com/decidim/decidim/pull/9528) +- **decidim-comments**, **decidim-core**: Backport 'Fix long word breaking on comments and cards' to v0.26 [\#9529](https://github.com/decidim/decidim/pull/9529) +- **decidim-assemblies**, **decidim-conferences**, **decidim-consultations**, **decidim-core**, **decidim-elections**, **decidim-initiatives**, **decidim-participatory processes**: Backport 'Fix background-image URLs with weird characters' to v0.26 [\#9531](https://github.com/decidim/decidim/pull/9531) +- **decidim-assemblies**, **decidim-conferences**, **decidim-elections**: Backport 'Fix cache hash on Hightlighted spaces' to v0.26 [\#9536](https://github.com/decidim/decidim/pull/9536) +- **decidim-accountability**: Backport 'Add short format to result date' to v0.26 [\#9540](https://github.com/decidim/decidim/pull/9540) +- **decidim-elections**: Backport 'Advertise users if BB connection is lost in trustees/admin zones' to v0.26 [\#9535](https://github.com/decidim/decidim/pull/9535) +- **decidim-core**: Backport 'Fix email subject when participatory space title is present' to v0.26 [\#9573](https://github.com/decidim/decidim/pull/9573) +- **decidim-conferences**: Backport 'Fix published conferences order' to v0.26 [\#9688](https://github.com/decidim/decidim/pull/9688) +- **decidim-comments**: Backport 'Fix creation notification when editing a comment ' to v0.26 [\#9690](https://github.com/decidim/decidim/pull/9690) +- **decidim-elections**: Backport 'Remove margin-bottom on votings navigation' to v0.26 [\#9692](https://github.com/decidim/decidim/pull/9692) +- **decidim-initiatives**: Backport 'Use public link on initiatives mailer' to v0.26 [\#9694](https://github.com/decidim/decidim/pull/9694) +- **decidim-accountability**: Backport 'Disallow creating grandchildren results' to v0.26 [\#9698](https://github.com/decidim/decidim/pull/9698) +- **decidim-forms**, **decidim-meetings**: Backport 'Prevent showing announcement on meetings registrations' to v0.26 [\#9700](https://github.com/decidim/decidim/pull/9700) +- **decidim-initiatives**: Backport 'Fix for initiative mailer when promoting committee is disabled' to v0.26 [\#9696](https://github.com/decidim/decidim/pull/9696) +- **decidim-elections**: Backport 'Improve steps election check page with census' to v0.26 [\#9702](https://github.com/decidim/decidim/pull/9702) +- **decidim-core**: Backport 'Fix translated attributes field type change' to v0.26 [\#9704](https://github.com/decidim/decidim/pull/9704) +- **decidim-core**: Backport 'Prevent missing ActionLog entries to break the application' to v0.26 [\#9706](https://github.com/decidim/decidim/pull/9706) +- **decidim-proposals**: Backport 'Fix publish event on official proposals' to v0.26 [\#9708](https://github.com/decidim/decidim/pull/9708) +- **decidim-admin**, **decidim-proposals**: Backport 'Add help text for proposals' 'publish answers immediately' setting ' to v0.26 [\#9712](https://github.com/decidim/decidim/pull/9712) +- **decidim-conferences**: Backport 'Return 404 when there isn't a valid component in program' to v0.26 [\#9717](https://github.com/decidim/decidim/pull/9717) +- **decidim-budgets**: Backport 'Fix budgets seeds on non development apps' to v0.26 [\#9719](https://github.com/decidim/decidim/pull/9719) +- **decidim-core**: Backport 'Fix creating automatic nicknames when taken by user_groups' to v0.26 [\#9721](https://github.com/decidim/decidim/pull/9721) +- **decidim-debates**: Backport 'Fix resource endorsed notification with Debates' to v0.26 [\#9723](https://github.com/decidim/decidim/pull/9723) +- **decidim-meetings**: Backport 'Fix agenda_item association with agenda' to v0.26 [\#9728](https://github.com/decidim/decidim/pull/9728) +- **decidim-verifications**: Backport 'Fix absolute urls on 'managed user error' event' to v0.26 [\#9730](https://github.com/decidim/decidim/pull/9730) +- **decidim-core**: Backport 'Fix mobile notifications switch component overlaps' to v0.26 [\#9732](https://github.com/decidim/decidim/pull/9732) +- **decidim-core**: Backport 'Fix blocked user nickname and avatar in user presenter' to v0.26 [\#9741](https://github.com/decidim/decidim/pull/9741) +- **decidim-admin**: Backport 'Fix form error overlap with character counter in the admin panel' to v0.26 [\#9749](https://github.com/decidim/decidim/pull/9749) +- **decidim-core**: Backport 'Fix the endorsement permissions' to v0.26 [\#9734](https://github.com/decidim/decidim/pull/9734) +- **decidim-meetings**: Backport 'Fix order when filtering Meetings' to v0.26 [\#9751](https://github.com/decidim/decidim/pull/9751) +- **decidim-proposals**: Backport 'Fix redundant notification on comments with linked proposals' to v0.26 [\#9746](https://github.com/decidim/decidim/pull/9746) +- **decidim-core**: Backport 'Make the HERE Map display in the currently selected language' to v0.26 [\#9714](https://github.com/decidim/decidim/pull/9714) +- **decidim-admin**, **decidim-forms**: Backport 'Fix admin language selector with more than 4 locales' to v0.26 [\#9710](https://github.com/decidim/decidim/pull/9710) +- **decidim-meetings**: Backport 'Ignore participatory spaces without models in meetings visible_for scope' to v0.26 [\#9794](https://github.com/decidim/decidim/pull/9794) +- **decidim-admin**: Backport 'Fix leaking emails on admin user search controller' to 0.26 [\#9797](https://github.com/decidim/decidim/pull/9797) +- **decidim-assemblies**, **decidim-participatory processes**: Backport 'Fix import of images on spaces' to v0.26 [\#9803](https://github.com/decidim/decidim/pull/9803) +- **decidim-core**: Backport 'Fix hashtags not recognized at the beginning of the string' to v0.26 [\#9811](https://github.com/decidim/decidim/pull/9811) +- **decidim-accountability**, **decidim-core**, **decidim-debates**, **decidim-initiatives**, **decidim-meetings**, **decidim-proposals**: Backport 'Fix version pages showing a HTTP 500 error when the version does not exist' to v0.26 [\#9809](https://github.com/decidim/decidim/pull/9809) +- **decidim-core**: Backport 'Fix hidden error messages on the registration form' to v0.26 [\#9813](https://github.com/decidim/decidim/pull/9813) +- **decidim-core**: Backport 'Fix multitenant organizations stats cache' to v0.26 [\#9807](https://github.com/decidim/decidim/pull/9807) +- **decidim-admin**, **decidim-initiatives**: Backport 'Fix initiatives components' to v0.26 [\#9825](https://github.com/decidim/decidim/pull/9825) +- Backport 'Fix doorkeeper initialization after 5.6.0 release' to v0.26 [\#9788](https://github.com/decidim/decidim/pull/9788) -If your application uses Sidekiq and you set a manual configuration file, you'll need to update it to add these two new queues. Otherwise these queues [will never run](https://github.com/mperham/sidekiq/issues/4897). +### Removed -#### User groups in global search +Nothing. -PR [\#8061](https://github.com/decidim/decidim/pull/8061) adds user groups to the global search and previously existing groups need to be indexed, otherwise it won't be available as search results. Run in a rails console or create a migration with: +### Internal + +- Backport 'Fix invalid translation in spec' to v0.26 [\#9435](https://github.com/decidim/decidim/pull/9435) +- Backport 'Remove the description field from the elections component seeds' to v0.26 [\#9553](https://github.com/decidim/decidim/pull/9553) +- Fix API GraphiQL system spec for 0.26 with newer ChromeDriver [\#9556](https://github.com/decidim/decidim/pull/9556) +- Backport 'Update `rokroskar/workflow-run-cleanup-action` GitHub action to v0.3.3' to v0.26 [\#9829](https://github.com/decidim/decidim/pull/9829) +- Backport 'Split parallel test coverage reports into their own folders' to v0.26 [\#9819](https://github.com/decidim/decidim/pull/9819) +- Backport 'Improve release process' to v0.26 [\#9864](https://github.com/decidim/decidim/pull/9864) + +### Developer improvements + +Nothing. + +## [0.26.2](https://github.com/decidim/decidim/tree/v0.26.2) + +### Added + +Nothing. + +### Changed + +Nothing. + +### Fixed + +- **decidim-comments**, **decidim-core**, **decidim-meetings**: Backport "Fix timeout in comment view and during meetings" to v0.26 [\#9091](https://github.com/decidim/decidim/pull/9091) +- **decidim-core**: Backport "Dont add external link container inside editor" to v0.26 [\#9108](https://github.com/decidim/decidim/pull/9108) +- **decidim-core**: Backport "Add base URI to meta image URLs" to v0.26 [\#9153](https://github.com/decidim/decidim/pull/9153) +- **decidim-initiatives**: Backport "Remove 'edit link' in topbar for initiative's authors" to v0.26 [\#9239](https://github.com/decidim/decidim/pull/9239) +- **decidim-elections**: Backport 'Clarify message to user when checking census' to v0.26 [\#9240](https://github.com/decidim/decidim/pull/9240) +- **decidim-participatory processes**: Backport 'Fix processes count in processes group title cell' to v0.26 [\#9242](https://github.com/decidim/decidim/pull/9242) +- **decidim-elections**: Backport 'Improve wording when casting your vote' to v0.26 [\#9243](https://github.com/decidim/decidim/pull/9243) +- **decidim-proposals**: Backport 'Add 'not answered' as a possible answer in proposals' to v0.26 [\#9246](https://github.com/decidim/decidim/pull/9246) +- **decidim-meetings**: Backport 'Fix meetings minutes migration' to v0.26 [\#9247](https://github.com/decidim/decidim/pull/9247) +- **decidim-assemblies**, **decidim-proposals**: Backport "Fix absolute urls on 'assembly member' and 'collaborative drafts' events" to v0.26 [\#9248](https://github.com/decidim/decidim/pull/9248) +- **decidim-accountability**, **decidim-consultations**: Backport 'Fix components navbar in consultations mobile ' to v0.26 [\#9249](https://github.com/decidim/decidim/pull/9249) +- **decidim-meetings**: Backport 'Move modal to body and fix condition' to v0.26 [\#9250](https://github.com/decidim/decidim/pull/9250) +- **decidim-meetings**: Backport 'Do not send upcoming meeting notification for hidden or withdrawn meetings' to v0.26 [\#9251](https://github.com/decidim/decidim/pull/9251) +- **decidim-core**: Backport 'Show only current organization in verification conflicts with multitenants' to v0.26 [\#9252](https://github.com/decidim/decidim/pull/9252) +- **decidim-elections**: Backport 'Send email to newly added trustees' to v0.26 [\#9253](https://github.com/decidim/decidim/pull/9253) +- **decidim-meetings**: Backport 'Fix registration type field highlighted in admin meeting creation form' to v0.26 [\#9254](https://github.com/decidim/decidim/pull/9254) +- **decidim-surveys**: Backport 'Fix contradictory form errors on survey form' to v0.26 [\#9257](https://github.com/decidim/decidim/pull/9257) +- **decidim-initiatives**: Backport 'Add edit and delete actions in InitiativeType admin table' to v0.26 [\#9260](https://github.com/decidim/decidim/pull/9260) +- **decidim-surveys**: Backport 'Clarify unregistered answers on surveys behavior' to v0.26 [\#9261](https://github.com/decidim/decidim/pull/9261) +- **decidim-elections**: Backport 'Fix voting with single election' to v0.26 [\#9262](https://github.com/decidim/decidim/pull/9262) +- **decidim-initiatives**: Backport 'Fix initiative print link, margin, and organization logo' to v0.26 [\#9263](https://github.com/decidim/decidim/pull/9263) +- **decidim-elections**: Backport 'Remove show more button on elections' to v0.26 [\#9264](https://github.com/decidim/decidim/pull/9264) +- **decidim-surveys**: Backport 'Fix survey activity log entries' to v0.26 [\#9265](https://github.com/decidim/decidim/pull/9265) +- **decidim-budgets**: Backport 'Remove beforeunload confirmation panel from the budgets voting' to v0.26 [\#9266](https://github.com/decidim/decidim/pull/9266) +- **decidim-admin**, **decidim-elections**: Backport 'Fix newsletters and Decidim Votings' to v0.26 [\#9258](https://github.com/decidim/decidim/pull/9258) +- **decidim-core**: Backport 'Fix notifications where resources are missing' to v0.26 [\#9256](https://github.com/decidim/decidim/pull/9256) +- **decidim-core**: Backport 'Enforce password validation rules on 'Forgot your password?' form' to v0.26 [\#9245](https://github.com/decidim/decidim/pull/9245) +- **decidim-core**: Backport 'Fix displaying blocked users in account follow pages' to v0.26 [\#9255](https://github.com/decidim/decidim/pull/9255) +- **decidim-core**: Backport 'Fix Leaflet trying to load "infinite amount of tiles"' to v0.26 [\#9269](https://github.com/decidim/decidim/pull/9269) +- **decidim-system**: Backport 'Enforce password validation rules on system admins' to v0.26 [\#9259](https://github.com/decidim/decidim/pull/9259) +- **decidim-meetings**: Backport 'Remove presenters in the meetings admin backoffice' to v0.26 [\#9323](https://github.com/decidim/decidim/pull/9323) +- **decidim-elections**: Backport 'Correctly show trustees and votings menu' to v0.26 [\#9324](https://github.com/decidim/decidim/pull/9324) +- **decidim-core**: Backport 'Fix hashtag parsing on URLs with fragments' to v0.26 [\#9326](https://github.com/decidim/decidim/pull/9326) +- **decidim-comments**, **decidim-core**: Backport 'Add missing events locales' to v0.26 [\#9327](https://github.com/decidim/decidim/pull/9327) +- **decidim-conferences**: Backport 'Make conference's partners logos always mandatory' to v0.26 [\#9328](https://github.com/decidim/decidim/pull/9328) +- **decidim-admin**: Backport 'Fix margin around warning message in colour settings' to v0.26 [\#9329](https://github.com/decidim/decidim/pull/9329) +- **decidim-elections**: Backport 'Hide more information link when there's no description on an election' to v0.26 [\#9331](https://github.com/decidim/decidim/pull/9331) +- **decidim-admin**, **decidim-assemblies**, **decidim-budgets**, **decidim-core**, **decidim-elections**, **decidim-meetings**, **decidim-pages**, **decidim-proposals**: Backport 'Apply crowdin feedback' to v0.26 [\#9333](https://github.com/decidim/decidim/pull/9333) +- **decidim-comments**, **decidim-core**: Backport 'Don't show deleted resources in last activities ' to v0.26 [\#9330](https://github.com/decidim/decidim/pull/9330) +- **decidim-elections**: Backport 'Fix election label translations' to v0.26 [\#9343](https://github.com/decidim/decidim/pull/9343) +- **decidim-verifications**: Backport 'Allow to renew expired verifications (if renewable)' to v0.26 [\#9344](https://github.com/decidim/decidim/pull/9344) +- **decidim-elections**: Backport 'Add error message when adding question and election has started' to v0.26 [\#9404](https://github.com/decidim/decidim/pull/9404) +- **decidim-core**: Backport 'Fix user interests' to v0.26 [\#9406](https://github.com/decidim/decidim/pull/9406) +- **decidim-elections**: Backport 'Fix regular expression on census check' to v0.26 [\#9408](https://github.com/decidim/decidim/pull/9408) +- **decidim-elections**: Backport 'Enforce YYYYmmdd format in birthdate when uploading census' to v0.26 [\#9410](https://github.com/decidim/decidim/pull/9410) +- **decidim-consultations**: Backport 'Return 404 when there isn't a question' to v0.26 [\#9414](https://github.com/decidim/decidim/pull/9414) +- **decidim-consultations**: Backport 'Return 404 when there isn't a consultation' to v0.26 [\#9413](https://github.com/decidim/decidim/pull/9413) +- **decidim-elections**: Backport 'Return 404 when there isn't a voting in elections_log' to v0.26 [\#9415](https://github.com/decidim/decidim/pull/9415) +- **decidim-proposals**: Backport 'Fix proposals creation with Participatory Texts ' to v0.26 [\#9416](https://github.com/decidim/decidim/pull/9416) +- **decidim-elections**: Backport 'Fix ActionLog when a ballot style is deleted' to v0.26 [\#9411](https://github.com/decidim/decidim/pull/9411) +- **decidim-elections**: Backport 'Only show that the code can be requested via SMS if its true' to v0.26 [\#9409](https://github.com/decidim/decidim/pull/9409) +- **decidim-budgets**, **decidim-proposals**: Backport 'Add missing translation keys proposals import and proposals picker' to v0.26 [\#9412](https://github.com/decidim/decidim/pull/9412) +- **decidim-elections**: Backport 'Fix HTML safe content in election voting' to v0.26 [\#9405](https://github.com/decidim/decidim/pull/9405) +- **decidim-core**: Backport 'Fix for internal links not displaying on page title' to v0.26 [\#9407](https://github.com/decidim/decidim/pull/9407) + +### Removed + +Nothing. + +### Internal + +- Backport 'Fix generators specs target branch' to v0.26 [\#9290](https://github.com/decidim/decidim/pull/9290) + +### Developer improvements + +Nothing. + +## [0.26.1](https://github.com/decidim/decidim/tree/v0.26.1) + +### Added + +Nothing. + +### Changed + +Nothing. + +### Fixed + +- **decidim-meetings**: Backport "Fix the meetings export to also include unpublished meetings" to v0.26 [\#8939](https://github.com/decidim/decidim/pull/8939) +- **decidim-system**, **decidim-verifications**: Backport "Fix verification report with multitenants" to v0.26 [\#8940](https://github.com/decidim/decidim/pull/8940) +- **decidim-core**: Backport "Fix officialized user event missing translations" to v0.26 [\#8942](https://github.com/decidim/decidim/pull/8942) +- **decidim-verifications**: Backport "Fix email for verification conflict with managed users" to v0.26 [\#8945](https://github.com/decidim/decidim/pull/8945) +- **decidim-core**: Backport "Fix profile notifications" to v0.26 [\#8949](https://github.com/decidim/decidim/pull/8949) +- **decidim-assemblies**, **decidim-budgets**, **decidim-comments**, **decidim-consultations**, **decidim-core**, **decidim-elections**, **decidim-forms**, **decidim-initiatives**, **decidim-participatory processes**, **decidim-proposals**: Backport several accessibility fixes to v0.26 [\#8950](https://github.com/decidim/decidim/pull/8950) +- **decidim-core**: Backport "Add missing 'Locale' string in i18n in account page" to v0.26 [\#8980](https://github.com/decidim/decidim/pull/8980) +- **decidim-meetings**: Backport "Truncate the meetings card description" to v0.26 [\#8979](https://github.com/decidim/decidim/pull/8979) +- **decidim-proposals**: Backport "Fix proposals' cards with big images" to v0.26 [\#8978](https://github.com/decidim/decidim/pull/8978) +- **decidim-initiatives**: Backport "Fix link to docs in initiatives admin" to v0.26 [\#8975](https://github.com/decidim/decidim/pull/8975) +- **decidim-comments**: Backport "Fix budget hard dependency and caching flag issues in comments" to v0.26 [\#8973](https://github.com/decidim/decidim/pull/8973) +- **decidim-participatory processes**: Backport "Fix processes creation form with stats, metrics and announcements" to v0.26 [\#8977](https://github.com/decidim/decidim/pull/8977) +- **decidim-initiatives**: Backport "Show signatures in answered initiatives" to v0.26 [\#8991](https://github.com/decidim/decidim/pull/8991) +- **decidim-core**: Backport "Add missing reveal__title classes" to v0.26 [\#8999](https://github.com/decidim/decidim/pull/8999) +- **decidim-core**: Backport "Remove the label from the dropdown menu opener" to v0.26 [\#9002](https://github.com/decidim/decidim/pull/9002) +- **decidim-core**: Backport "Fix mobile nav keyboard focus" to v0.26 [\#9001](https://github.com/decidim/decidim/pull/9001) +- **decidim-core**: Backport "Fix main navigation aria-current attribute" to v0.26 [\#9000](https://github.com/decidim/decidim/pull/9000) +- **decidim-core**: Backport "Show character counter when replying to message" to v0.26 [\#9003](https://github.com/decidim/decidim/pull/9003) +- **decidim-core**: Backport "Fix character counter with emoji picker close to maximum characters" to v0.26 [\#9012](https://github.com/decidim/decidim/pull/9012) +- **decidim-api**, **decidim-assemblies**, **decidim-conferences**, **decidim-consultations**, **decidim-initiatives**, **decidim-meetings**, **decidim-participatory processes**, **decidim-proposals**: Backport "Fix API when meetings have proposal linking disabled" to v0.26 [\#8992](https://github.com/decidim/decidim/pull/8992) +- **decidim-core**: Backport "Fix Devise flash messages translation" to v0.26 [\#9043](https://github.com/decidim/decidim/pull/9043) +- **decidim-core**: Backport "Disable new conversation next button when no users selected" to v0.26 [\#9054](https://github.com/decidim/decidim/pull/9054) +- **decidim-initiatives**: Backport "Fix initiatives signatures issues" to v0.26 [\#8974](https://github.com/decidim/decidim/pull/8974) +- **decidim-blogs**, **decidim-core**, **decidim-debates**, **decidim-proposals**: Backport "Fix for endorsed_by with other user group's member" to v0.26 [\#9062](https://github.com/decidim/decidim/pull/9062) +- **decidim-proposals**: Backport "Fix footer actions caching on proposals' card" to v0.26 [\#9063](https://github.com/decidim/decidim/pull/9063) +- **decidim-admin**: Backport "Add missing 'Locale' string in i18n in selective newsletter" to v0.26 [\#9064](https://github.com/decidim/decidim/pull/9064) +- **decidim-core**: Backport "Fix social share button sharing" to v0.26 [\#9065](https://github.com/decidim/decidim/pull/9065) +- **decidim-meetings**: Backport "Use published meetings scope on processes landing and proposal's form" to v0.26 [\#9066](https://github.com/decidim/decidim/pull/9066) +- **decidim-core**: Backport "Require omniauth/rails_csrf_protection explicitly" to v0.26 [\#9067](https://github.com/decidim/decidim/pull/9067) +- **decidim-core**, **decidim-proposals**: Backport "Fix amendable events title" to v0.26 [\#9079](https://github.com/decidim/decidim/pull/9079) +- **decidim-proposals**: Backport "Create admin log records when proposals are imported from a file" to v0.26 [\#9077](https://github.com/decidim/decidim/pull/9077) +- **decidim-comments**, **decidim-core**, **decidim-proposals**: Backport "Add noreferrer and ugc to links" to v0.26 [\#9078](https://github.com/decidim/decidim/pull/9078) +- **decidim-meetings**: Backport "Fix submit in meetings admin form" to v0.26 [\#9076](https://github.com/decidim/decidim/pull/9076) +- **decidim-core**: Backport "Fix session cookie SameSite policy" to v0.26 [\#9059](https://github.com/decidim/decidim/pull/9059) +- **decidim-budgets**, **decidim-core**, **decidim-debates**, **decidim-meetings**, **decidim-proposals**: Backport "Fix cache URLs on cards" to v0.26 [\#9074](https://github.com/decidim/decidim/pull/9074) +- **decidim-assemblies**, **decidim-conferences**, **decidim-consultations**, **decidim-core**, **decidim-initiatives**, **decidim-participatory processes**: Backport "Fix Twitter hashtag search when it starts with a number" to v0.26 [\#9075](https://github.com/decidim/decidim/pull/9075) + +### Removed + +Nothing. + +### Internal + +- Backport "Fix ActionMailer preview loading" to v0.26 [\#8963](https://github.com/decidim/decidim/pull/8963) +- Backport "Fix flaky spec in meetings multi-date selectors" to v0.26 [\#8976](https://github.com/decidim/decidim/pull/8976) +- Backport "Local HTML validator for the CI" to v0.26 [\#9004](https://github.com/decidim/decidim/pull/9004) +- Backport "Fix API when meetings have proposal linking disabled" to v0.26 [\#8992](https://github.com/decidim/decidim/pull/8992) + +### Developer improvements + +- Backport "Fix Devise configs that depend on Decidim configs" to v0.26 [\#9022](https://github.com/decidim/decidim/pull/9022) +- Backport "Fix Faker address country code in seeds" to v0.26 [\#9046](https://github.com/decidim/decidim/pull/9046) + +## [0.26.0](https://github.com/decidim/decidim/tree/v0.26.0) + +### Added + +Nothing. + +### Changed + +- **decidim-comments**: Backport "Show hidden comments replies" to v0.26 [\#8868](https://github.com/decidim/decidim/pull/8868) + +### Fixed + +- **decidim-proposals**: Backport "Fix geocoding NaN values" to v0.26 [\#8778](https://github.com/decidim/decidim/pull/8778) +- **decidim-core**: Backport "Add 'nofollow noopener' rel to the profile personal URL" to v0.26 [\#8780](https://github.com/decidim/decidim/pull/8780) +- **decidim-generators**: Backport "Add .keep file to empty directory to include on git committing" to v0.26 [\#8788](https://github.com/decidim/decidim/pull/8788) +- **decidim-core**: Backport "Fix avatar upload validation errors are displayed twice" to v0.26 [\#8798](https://github.com/decidim/decidim/pull/8798) +- **decidim-meetings**: Backport "Fix displaying hidden meetings in homepage's 'upcoming meetings' content block" to v0.26 [\#8819](https://github.com/decidim/decidim/pull/8819) +- **decidim-participatory processes**: Backport "Fix characters not encoded in highlighted participatory processes groups title" to v0.26 [\#8824](https://github.com/decidim/decidim/pull/8824) +- **decidim-comments**: Backport "Fix displaying hidden related resources" to v0.26 [\#8835](https://github.com/decidim/decidim/pull/8835) +- **decidim-generators**: Backport "Add natively a .keep file to empty directory to include on git committing" to v0.26 [\#8836](https://github.com/decidim/decidim/pull/8836) +- **decidim-consultations**, **decidim-core**, **decidim-elections**: Backport "Fix report moderation for all the spaces" to v0.26 [\#8841](https://github.com/decidim/decidim/pull/8841) +- **decidim-meetings**, **decidim-participatory processes**: Backport "Fix displaying hidden meetings in show process page" to v0.26 [\#8843](https://github.com/decidim/decidim/pull/8843) +- **decidim-meetings**: Backport "Fix displaying hidden resources in global search" to v0.26 [\#8850](https://github.com/decidim/decidim/pull/8850) +- **decidim-core**: Backport "Fix activity cell disappearing author images" to v0.26 [\#8848](https://github.com/decidim/decidim/pull/8848) +- **decidim-initiatives**: Backport "Fix scope validation on initiative's creation" to v0.26 [\#8857](https://github.com/decidim/decidim/pull/8857) +- **decidim-accountability**: Backport "Fix accountability categories' colors" to v0.26 [\#8858](https://github.com/decidim/decidim/pull/8858) +- **decidim-debates**: Backport "Remove actions from debates' cards" to v0.26 [\#8861](https://github.com/decidim/decidim/pull/8861) +- **decidim-assemblies**: Backport "Fix assemblies title when there are unpublished children" to v0.26 [\#8860](https://github.com/decidim/decidim/pull/8860) +- **decidim-core**: Backport "Fix cache_hash generation in AuthorCell" to v0.26 [\#8862](https://github.com/decidim/decidim/pull/8862) +- **decidim-meetings**, **decidim-participatory processes**: Backport "Fix displaying hidden meetings in processes group's 'upcoming meetings' content block" to v0.26 [\#8864](https://github.com/decidim/decidim/pull/8864) +- **decidim-assemblies**, **decidim-conferences**, **decidim-consultations**, **decidim-proposals**: Backport "Fix notifications when there is a note proposal in other spaces than processes" to v0.26 [\#8865](https://github.com/decidim/decidim/pull/8865) +- **decidim-proposals**: Backport "Fix answered proposals display" to v0.26 [\#8863](https://github.com/decidim/decidim/pull/8863) +- **decidim-comments**: Backport "Show hidden comments replies" to v0.26 [\#8868](https://github.com/decidim/decidim/pull/8868) +- **decidim-meetings**: Backport "Fix meetings iframe embed code" to v0.26 [\#8884](https://github.com/decidim/decidim/pull/8884) + +### Removed + +Nothing. + +### Internal + +- Backport "Fix flaky test in UpdateAssemblyMember" to v0.26 [\#8803](https://github.com/decidim/decidim/pull/8803) + +### Developer improvements + +Nothing. + +## [0.26.0.rc2](https://github.com/decidim/decidim/tree/v0.26.0.rc2) + +### Added + +Nothing. +#### Moderated content can now be removed from search index +PR [\#8811](https://github.com/decidim/decidim/pull/8811) is addressing an issue when the moderated resources are not removed from the general search index. + +This will automatically work for new moderated resources. For already existing ones, we have introduced a new task that will remove the moderated content from being displayed in search: ```ruby - Decidim::UserGroup.find_each(&:try_update_index_for_search_resource) +bin/rails decidim:upgrade:moderation:remove_from_search ``` -Please be aware that it could take a while if your database has a lot of groups. +#### Default Decidim app fully configurable via ENV vars + +### Changed + +Nothing. + +### Fixed + +- **decidim-meetings**: Backport "Fix for preview unpublished meetings by admin user" to v0.26 [\#8724](https://github.com/decidim/decidim/pull/8724) +- **decidim-comments**: Backport "Adds emojis when user edits a comment" to v0.26 [\#8743](https://github.com/decidim/decidim/pull/8743) +- **decidim-core**: Backport "Properly mark sender and recipient in Conversation" to v0.26 [\#8746](https://github.com/decidim/decidim/pull/8746) +- **decidim-participatory processes**: Backport "Fix order by weight in processes groups' processes content block" to v0.26 [\#8771](https://github.com/decidim/decidim/pull/8771) +- **decidim-core**: Backport "Don't display blocked users in mentions" to v0.26 [\#8770](https://github.com/decidim/decidim/pull/8770) + +### Removed + +Nothing. + +### Internal + +- Backport "Revert the i18n-tasks initialization syntax" to v0.26 [\#8696](https://github.com/decidim/decidim/pull/8696) +- Backport "Lock graphql version to 1.12 minor" to v0.26 [\#8695](https://github.com/decidim/decidim/pull/8695) +- Disable codeclimate's stylelint [\#8711](https://github.com/decidim/decidim/pull/8711) -#### ActiveStorage migration +### Developer improvements -PR [\#7598](https://github.com/decidim/decidim/pull/7598) migrates attachments from `CarrierWave` to `ActiveStorage`. There was a migration to move some organization fields to a content block (decidim-core/db/migrate/20180810092428_move_organization_fields_to_hero_content_block.rb) including the use of `CarrierWave` to migrate an image. This part has been removed. Please, if your application has the old migration replace its content with the changed file to avoid errors in the future because `CarrierWave` dependency will be eliminated. +- Backport "Fix webpacker generator for modules" to v0.26 [\#8750](https://github.com/decidim/decidim/pull/8750) -PR[\#7902](https://github.com/decidim/decidim/pull/7902) provides a task to migrate existing `CarrierWave` attachment files to `ActiveStorage`. Keep in mind that the `ActiveStorage` migration PRs don't delete `CarrierWave` attachments and preserve the columns used by it. To guarantee the access to `CarrierWave` files the gem must be installed (the current core engine maintains that dependency) and configured as it was before the migration to `ActiveStorage`. The task downloads each file using `CarrierWave` uploaders and uploads it again using `ActiveStorage`. This PR provides 2 tasks: +## [0.26.0.rc1](https://github.com/decidim/decidim/tree/v0.26.0.rc1) -* The task to copy files to `ActiveStorage`. The task generates a log file in `log/` with a line with the result of each migration. The result can be: - * `[OK] Migrated - [OK] Checksum identical` if the file was copied successfully and the checksums of the origin and copied files are identical. This should be the expected result. - * `[KO] Migrated - [KO] Checksum different` if the file was copied successfully but the checksums are different. - * `[SKIP] Migrated` The migration was skipped because the task detected that there was already an existing file attached with `ActiveStorage` (the other task allows us to check if `CarrierWave` and `ActiveStorage` files are identical. - * `[ERROR] Exception` if any error prevents the migration of the file. The error message is included in the result. +### Migration notes +#### Register assets paths +To prevent Zeitwerk from trying to autoload classes from the `app/packs` folder, it's necesary to register these paths for each module and for the application using the method `Decidim.register_assets_path` on initializers. This is explained in the webpacker migration guides for [applications](https://github.com/decidim/decidim/blob/develop/docs/modules/develop/pages/guide_migrate_webpacker_app.adoc#help-decidim-to-know-the-applications-assets-folder) and [modules](https://github.com/decidim/decidim/blob/develop/docs/modules/develop/pages/guide_migrate_webpacker_module.adoc#help-decidim-to-know-the-modules-assets-folder)), and was implemented in [\#8449](https://github.com/decidim/decidim/pull/8449). -The task also creates a mapping of paths in `tmp/attachment_mappings.csv` with the id of the instance, the name of the `CarrierWave` attribute and its origin path and the destination path in `ActiveStorage`. To run this task execute: +#### Unconfirmed access disabled by default +As per [\#8233](https://github.com/decidim/decidim/pull/8233), by default all participants must confirm their email account to sign in. Implementors can change this setting as a [initializer configuration](https://docs.decidim.org/en/configure/initializer/#_unconfirmed_access_for_users): +```ruby +Decidim.configure do |config| + config.unconfirmed_access_for = 2.days +end ``` -rails decidim:active_storage_migrations:migrate_from_carrierwave_to_active_storage + +#### User workflows change to prevent user enumeration attacks + +Until now it was possible to see if an email account was registered in Decidim, by using features like "Forgot your password", as the response changed if the email existed ("`You will receive an email with instructions on how to reset your password in a few minutes`") that's different to a non-existing user account ("`could not be found. Did you sign up previously?`"). This allows User Enumration attacks, where a malicious actor can check if anyone has an acount in the platform. As per [\#8537](https://github.com/decidim/decidim/pull/8537), anyone has the same answer always "`If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes`". + +#### Blocked user in global search + +PR [\#8658](https://github.com/decidim/decidim/pull/8658) Blocked users are present in global search, to update the search and make them disappear, Run in a rails console or create a migration with: + +```ruby + Decidim::User.find_each(&:try_update_index_for_search_resource) ``` -Note that the migration generates instances of `ActiveStorage::Attachment` in case they are not yet created. To repeat the migration from scratch it would be enough to delete all `ActiveStorage::Attachment` items (be careful not to delete attachments that were created earlier with `ActiveStorage`) +Please be aware that it could take a while if your database has a lot of Users. +#### Fix statistics in Comments -* The task to check migration and compare files. This task finds each `CarrierWave` attachment file and looks for corresponding `ActiveStorage` attachment and compares them if possible. The result for each attachment can be: - * `[OK] Checksum identical` if both files exist and checkums are identical. - * `[KO] Checksum different` if both files exist but checkums are different. - * `[SKIP] Pending migration` if the `ActiveStorage` file is not present. - * `[ERROR] Exception` if there is any error in the checking process. The error message is included in the result. +As per [#8012](https://github.com/decidim/decidim/pull/8012), for fixing statistic in comments. There's a rake task that you need to run: +```ruby +rake decidim_comments:update_participatory_process_in_comments +``` -To run this task execute: +#### Base64 images migration + +As per [\#8250](https://github.com/decidim/decidim/pull/8250), we've replaced the default base64 editor images attachment with the use of ActiveStorage attachments. This PR also adds a task to parse all editor contents and replace existing base64 images with attachments. The task parses all the attributes which can be edited from admin using the WYSIWYG editor. The task requires an argument with the email of an admin used to create EditorImage instances. To run this task execute: ``` -rails decidim:active_storage_migrations:check_migration_from_carrierwave_to_active_storage +rails decidim:active_storage_migrations:migrate_inline_images_to_active_storage[admin_email] ``` ### Added @@ -704,7 +1023,199 @@ rails decidim:active_storage_migrations:check_migration_from_carrierwave_to_acti - Bump addressable version because security issues [\#8229](https://github.com/decidim/decidim/pull/8229) - Active storage migrations service [\#7902](https://github.com/decidim/decidim/pull/7902) - Remove obsolete rake webpack task [\#8237](https://github.com/decidim/decidim/pull/8237) +- **decidim-budgets**: Port decidim-budgets improvements from AjuntamentdeBarcelona/decidim [\#8249](https://github.com/decidim/decidim/pull/8249) +- **decidim-elections**: Improve evote admin logs [\#8263](https://github.com/decidim/decidim/pull/8263) +- **decidim-blogs**, **decidim-meetings**: Add card images to meetings and blog posts [\#8276](https://github.com/decidim/decidim/pull/8276) +- **decidim-admin**: Align UI groups filtering with the rest of decidim [\#8105](https://github.com/decidim/decidim/pull/8105) +- **decidim-admin**, **decidim-proposals**: Improve error messages in admin panel [\#8193](https://github.com/decidim/decidim/pull/8193) +- **decidim-elections**: Allow to mark trustees as missing [\#8314](https://github.com/decidim/decidim/pull/8314) +- **decidim-admin**: Add sorting to private participants in a participatory space [\#8242](https://github.com/decidim/decidim/pull/8242) +- **decidim-comments**: Improve control of comments in meetings and debates [\#8027](https://github.com/decidim/decidim/pull/8027) +- **decidim-proposals**: Offer a way to see all proposals in withdrawn proposal list [\#8251](https://github.com/decidim/decidim/pull/8251) +- **decidim-admin**, **decidim-proposals**: Configurable default order for proposals [\#8295](https://github.com/decidim/decidim/pull/8295) +- **decidim-assemblies**: Filter assemblies by assembly type in admin [\#7153](https://github.com/decidim/decidim/pull/7153) +- **decidim-assemblies**: Non participant assembly members avatar [\#8277](https://github.com/decidim/decidim/pull/8277) +- **decidim-core**: Add image file upload in QuillJS editor [\#8250](https://github.com/decidim/decidim/pull/8250) +- **decidim-meetings**: Make meeting report editable by the author in front-end [\#8209](https://github.com/decidim/decidim/pull/8209) +- **decidim-core**: Improve dialog accessibility [\#8294](https://github.com/decidim/decidim/pull/8294) +- **decidim-meetings**: Ability for users to withdraw their meetings [\#8248](https://github.com/decidim/decidim/pull/8248) +- **decidim-admin**: Add colors accessibility warning in admin Appearance [\#8354](https://github.com/decidim/decidim/pull/8354) +- **decidim-proposals**: Import proposal answers [\#8271](https://github.com/decidim/decidim/pull/8271) +- **decidim-core**: Add more actions in QuillJS toolbar [\#8120](https://github.com/decidim/decidim/pull/8120) +- **decidim-meetings**: Add more filter options to directory meetings page [\#8333](https://github.com/decidim/decidim/pull/8333) +- **decidim-assemblies**, **decidim-conferences**, **decidim-participatory processes**: Add filters for Participatory process admins section [\#8106](https://github.com/decidim/decidim/pull/8106) +- **decidim-budgets**: Show modal when user is trying to leave with pending vote [\#8387](https://github.com/decidim/decidim/pull/8387) +- **decidim-meetings**: Meetings iframe visibility [\#8307](https://github.com/decidim/decidim/pull/8307) +- **decidim-budgets**: Add search, filters and sorting to admin panel budget projects [\#8592](https://github.com/decidim/decidim/pull/8592) +- **decidim-core**: Describe the notifications' time with words [\#8564](https://github.com/decidim/decidim/pull/8564) +- **decidim-comments**, **decidim-core**: Add link to comments in Notifications [\#8607](https://github.com/decidim/decidim/pull/8607) +- **decidim-comments**, **decidim-core**: Add full content of comments in notifications [\#8581](https://github.com/decidim/decidim/pull/8581) +- **decidim-core**: Change colors on mobile navigation bar [\#8628](https://github.com/decidim/decidim/pull/8628) +- **decidim-core**, **decidim-proposals**: Add author to proposals in notifications [\#8603](https://github.com/decidim/decidim/pull/8603) +- **decidim-comments**, **decidim-core**, **decidim-meetings**, **decidim-proposals**: Allow participants to receive translated content by email [\#8174](https://github.com/decidim/decidim/pull/8174) +- **decidim-admin**: Add search, filters, pagination and sorting to moderated users [\#8620](https://github.com/decidim/decidim/pull/8620) +- **decidim-surveys**: Add "title and description" in surveys [\#8588](https://github.com/decidim/decidim/pull/8588) + +### Changed + +- **decidim-elections**: Validate census CSV headers [\#8264](https://github.com/decidim/decidim/pull/8264) +- **decidim-meetings**: Improve Attendees count error handling on frontend [\#8238](https://github.com/decidim/decidim/pull/8238) +- **decidim-core**: Disable unconfirmed access by default [\#8233](https://github.com/decidim/decidim/pull/8233) +- **decidim-meetings**: Rename 'upcoming events' content block to 'upcoming meetings' [\#8412](https://github.com/decidim/decidim/pull/8412) +- **decidim-core**: Change user workflows to prevent user enumeration attacks [\#8537](https://github.com/decidim/decidim/pull/8537) + +### Fixed + +- **decidim-accountability**: Fix accountability notifications proposal title [\#8240](https://github.com/decidim/decidim/pull/8240) +- **decidim-elections**: Remove white spaces in Census [\#8262](https://github.com/decidim/decidim/pull/8262) +- **decidim-debates**, **decidim-meetings**, **decidim-proposals**: Fix characters not encoded in title [\#8253](https://github.com/decidim/decidim/pull/8253) +- **decidim-proposals**: Fix flaky test on proposals splitting [\#8302](https://github.com/decidim/decidim/pull/8302) +- **decidim-core**: Fix invalid i18n values for diff changeset [\#8299](https://github.com/decidim/decidim/pull/8299) +- **decidim-meetings**: Fix live? missing method delegation in online_meeting cell [\#8241](https://github.com/decidim/decidim/pull/8241) +- **decidim-comments**: Fix statistics in Comments [\#8012](https://github.com/decidim/decidim/pull/8012) +- **decidim-budgets**: Fix some explore budgets specs [\#8303](https://github.com/decidim/decidim/pull/8303) +- **decidim-core**: Fix missing icons after CORS [\#8290](https://github.com/decidim/decidim/pull/8290) +- **decidim-core**: Remove unnecessary spacer from external link indicator [\#8291](https://github.com/decidim/decidim/pull/8291) +- **decidim-core**: [CVE-2021-22942] Possible Open Redirect in Host Authorization Middleware [\#8265](https://github.com/decidim/decidim/pull/8265) +- **decidim-debates**: Fix "last comment by" when commenter is a user group [\#8279](https://github.com/decidim/decidim/pull/8279) +- **decidim-proposals**: Similar proposal functionality breaks when the machine translation is enabled. [\#8098](https://github.com/decidim/decidim/pull/8098) +- **decidim-core**: Fix regex that parses users and groups references inside content. [\#8297](https://github.com/decidim/decidim/pull/8297) +- **decidim-assemblies**: Fix birthday attribute type in Assembly Members [\#8311](https://github.com/decidim/decidim/pull/8311) +- **decidim-comments**: Fix issues with dynamic comments polling [\#8317](https://github.com/decidim/decidim/pull/8317) +- **decidim-assemblies**: Fix "Edit" and "View public page" in Assembly Members [\#8312](https://github.com/decidim/decidim/pull/8312) +- **decidim-comments**: Fix "View all comments" link in single comment page [\#8308](https://github.com/decidim/decidim/pull/8308) +- **decidim-budgets**: Fix dont allow budget exceeding in project view [\#8261](https://github.com/decidim/decidim/pull/8261) +- **decidim-debates**: Fix title meta tag for debates [\#8323](https://github.com/decidim/decidim/pull/8323) +- **decidim-proposals**: Fix UserAnswersSerializer for CSV exports [\#8329](https://github.com/decidim/decidim/pull/8329) +- **decidim-admin**: Do not block registered users with InviteUserAgain [\#8268](https://github.com/decidim/decidim/pull/8268) +- **decidim-conferences**: Fix error when accessing the meetings of a conference with speakers related [\#8369](https://github.com/decidim/decidim/pull/8369) +- **decidim-conferences**: Fix details on conference speakers: affiliation order, personal URL link, seeds and more info link [\#8378](https://github.com/decidim/decidim/pull/8378) +- **decidim-meetings**: Define localized fields in Decidim::Meetings:DiffRenderer [\#8381](https://github.com/decidim/decidim/pull/8381) +- **decidim-core**: Include only public entities in the following page [\#8361](https://github.com/decidim/decidim/pull/8361) +- **decidim-proposals**: Any user can access proposal's pages representing the "create a proposal" steps [\#8390](https://github.com/decidim/decidim/pull/8390) +- **decidim-core**: Fix localized faker with single locale [\#8394](https://github.com/decidim/decidim/pull/8394) +- **decidim-core**: Fix user activity page error message with missing username [\#8403](https://github.com/decidim/decidim/pull/8403) +- **decidim-core**: Fix conversation with deleted account [\#8409](https://github.com/decidim/decidim/pull/8409) +- **decidim-core**: Fix javascript exception when geocoding proposals is disabled [\#8413](https://github.com/decidim/decidim/pull/8413) +- **decidim-blogs**: Add missing translations [\#8426](https://github.com/decidim/decidim/pull/8426) +- **decidim-comments**: Refresh comments component after updating [\#8362](https://github.com/decidim/decidim/pull/8362) +- **decidim-core**: Fix webpacker issue when using zeitwerk [\#8444](https://github.com/decidim/decidim/pull/8444) +- **decidim-core**: Improve Zeitwerk assets paths to ignore [\#8449](https://github.com/decidim/decidim/pull/8449) +- **decidim-surveys**: Fix notification after creating survey [\#8463](https://github.com/decidim/decidim/pull/8463) +- **decidim-budgets**, **decidim-comments**: Fix comment's get link in project view [\#8450](https://github.com/decidim/decidim/pull/8450) +- **decidim-elections**: Fix report missing trustee admin log entry [\#8468](https://github.com/decidim/decidim/pull/8468) +- **decidim-system**: Add `pptx` in allowed_file_extensions (of admin) [\#8502](https://github.com/decidim/decidim/pull/8502) +- **decidim-core**: Fix 404 link in 'how to participate' home content block [\#8513](https://github.com/decidim/decidim/pull/8513) +- **decidim-meetings**: Fix meetings with multiple dates [\#8497](https://github.com/decidim/decidim/pull/8497) +- **decidim-core**: Fix pt-BR issue [\#8523](https://github.com/decidim/decidim/pull/8523) +- **decidim-generators**: Freezing webpacker to RC.5 until RC.7 is fixed [\#8531](https://github.com/decidim/decidim/pull/8531) +- **decidim-conferences**: Fix conference speakers when there isn't any avatar [\#8520](https://github.com/decidim/decidim/pull/8520) +- **decidim-assemblies**, **decidim-participatory processes**: Fix the copy of components weights in participatory processes and assemblies [\#8498](https://github.com/decidim/decidim/pull/8498) +- **decidim-meetings**: Fix meetings input when rich text editor is disabled [\#8534](https://github.com/decidim/decidim/pull/8534) +- **decidim-meetings**: Fix showing created meetings in 'my public profile' [\#8519](https://github.com/decidim/decidim/pull/8519) +- **decidim-meetings**, **decidim-proposals**: Fix various proposal picker issues when there are thousands of proposals [\#8558](https://github.com/decidim/decidim/pull/8558) +- **decidim-core**: Remove border on all the fieldsets [\#8561](https://github.com/decidim/decidim/pull/8561) +- **decidim-initiatives**: Remove wrong in initiatives header [\#8563](https://github.com/decidim/decidim/pull/8563) +- **decidim-core**: Fix CSS layout wrapper top padding [\#8562](https://github.com/decidim/decidim/pull/8562) +- **decidim-forms**, **decidim-surveys**: Fix duplicated answers in surveys [\#8560](https://github.com/decidim/decidim/pull/8560) +- **decidim-meetings**: Fix the meeting copy functionality [\#8430](https://github.com/decidim/decidim/pull/8430) +- **decidim-core**: Move social login buttons to the top of the login modal [\#8574](https://github.com/decidim/decidim/pull/8574) +- **decidim-comments**, **decidim-meetings**: Fix HTML injection in comments and meeting's description [\#8511](https://github.com/decidim/decidim/pull/8511) +- **decidim-core**: Fix avatar thumbnail in participants' profile [\#8577](https://github.com/decidim/decidim/pull/8577) +- **decidim-core**: Rename index to avoid conflicts with decidim_awesome module migrations [\#8613](https://github.com/decidim/decidim/pull/8613) +- **decidim-core**: Fix group mentions in notifications [\#8598](https://github.com/decidim/decidim/pull/8598) +- **decidim-forms**, **decidim-surveys**: Fix surveys exports with free text in multiple option [\#8582](https://github.com/decidim/decidim/pull/8582) +- **decidim-core**: Fix reply to a conversation with deleted participants [\#8635](https://github.com/decidim/decidim/pull/8635) +- **decidim-admin**, **decidim-debates**, **decidim-proposals**: Fix consistency in creation actions phrasing: "Participants can create XXX" [\#8650](https://github.com/decidim/decidim/pull/8650) +- **decidim-core**: Fix wrong display of deleted accounts in conversations [\#8641](https://github.com/decidim/decidim/pull/8641) +- **decidim-core**: Fix cache key on ActivityCell [\#8654](https://github.com/decidim/decidim/pull/8654) +- **decidim-participatory processes**: Fix participatory groups leaks on other organizations/tenants [\#8651](https://github.com/decidim/decidim/pull/8651) +- **decidim-core**: Fix blocked users appear in search [\#8658](https://github.com/decidim/decidim/pull/8658) +- **decidim-meetings**: Don't start poll meetings component when DOM elements are not present [\#8676](https://github.com/decidim/decidim/pull/8676) +- **decidim-initiatives**, **decidim-proposals**: Fix initiative attachments [\#7452](https://github.com/decidim/decidim/pull/7452) +- **decidim-assemblies**: Fix performance issues on assemblies page when having many private users [\#8509](https://github.com/decidim/decidim/pull/8509) +- **decidim-proposals**: Add location data to proposals export and import [\#8679](https://github.com/decidim/decidim/pull/8679) +- **decidim-meetings**: Fix meetings form embed type visibility [\#8602](https://github.com/decidim/decidim/pull/8602) +- **decidim-meetings**: Do not send upcoming meeting events notification for past events [\#8665](https://github.com/decidim/decidim/pull/8665) + +### Removed + +- **decidim-proposals**: Remove "Allow card image" setting from Proposals [\#8281](https://github.com/decidim/decidim/pull/8281) +- **decidim-assemblies**: Remove designation_mode field from Assembly Members [\#8310](https://github.com/decidim/decidim/pull/8310) +- **decidim-participatory processes**: Remove admin show page in Participatory Process Groups [\#8313](https://github.com/decidim/decidim/pull/8313) + +### Developer improvements + +- Fix Luxembourgish locale [\#8270](https://github.com/decidim/decidim/pull/8270) +- Fix ARIA roles for dialogs and tooltips [\#8293](https://github.com/decidim/decidim/pull/8293) +- Add selectors on edit_form_fields [\#8353](https://github.com/decidim/decidim/pull/8353) +- Fix HTTPOnly and secure flag on the cookie acceptance cookie [\#8358](https://github.com/decidim/decidim/pull/8358) +- Add Brakeman to GitHub Actions for improving security [\#6832](https://github.com/decidim/decidim/pull/6832) +- Disallow redirection to the host when performing redirect_back [\#8296](https://github.com/decidim/decidim/pull/8296) +- Improve performance on the serializers by using includes, query counter [\#8278](https://github.com/decidim/decidim/pull/8278) +- Enforce redirects to include the organization host [\#8385](https://github.com/decidim/decidim/pull/8385) +- Fix issues with the session/environment security configs [\#8360](https://github.com/decidim/decidim/pull/8360) +- Improve extendability on some controllers [\#8398](https://github.com/decidim/decidim/pull/8398) +- Add avatar eager logging to UserEntityFinder #8416 [\#8417](https://github.com/decidim/decidim/pull/8417) +- Increase text contrast in current phase of a participatory process [\#8422](https://github.com/decidim/decidim/pull/8422) +- Fix CVE-2021-41136 (HTTP Request Smuggling in puma) [\#8431](https://github.com/decidim/decidim/pull/8431) +- Remove anchored dependency [\#8453](https://github.com/decidim/decidim/pull/8453) +- Fix pt-BR issue [\#8523](https://github.com/decidim/decidim/pull/8523) +- Add rendered view instrumentation information [\#8530](https://github.com/decidim/decidim/pull/8530) +- Optimize open data exporter for large amount of data [\#8503](https://github.com/decidim/decidim/pull/8503) +- Add cache key separator to cache_hash [\#8559](https://github.com/decidim/decidim/pull/8559) +- Improve generation of the opendata export [\#8593](https://github.com/decidim/decidim/pull/8593) +- Add several cache keys to cells [\#8566](https://github.com/decidim/decidim/pull/8566) +- Update password strength check [\#8455](https://github.com/decidim/decidim/pull/8455) +- Remove etherpad-lite dependency [\#8541](https://github.com/decidim/decidim/pull/8541) +- Fix Rack::Attack initializer custom parameter configuration [\#8643](https://github.com/decidim/decidim/pull/8643) + +### Internal + +- Fix dependencies locks after 0.26.0.dev bump [\#8247](https://github.com/decidim/decidim/pull/8247) +- Add modules recommendations in documentation [\#8218](https://github.com/decidim/decidim/pull/8218) +- Fix webpacker dependency lock [\#8272](https://github.com/decidim/decidim/pull/8272) +- Improve README with examples [\#8244](https://github.com/decidim/decidim/pull/8244) +- Update foundation-sites to 6.7.0 for better Dart Sass compatibility [\#8273](https://github.com/decidim/decidim/pull/8273) +- Fix NPM packages versioning during release process [\#8280](https://github.com/decidim/decidim/pull/8280) +- Add 'Lint PR title' workflow to CI [\#8285](https://github.com/decidim/decidim/pull/8285) +- Don't trigger PR linting on pushes, only on PRs [\#8304](https://github.com/decidim/decidim/pull/8304) +- Prevent root package.json to be treated as a package [\#8315](https://github.com/decidim/decidim/pull/8315) +- Fix CSS validation tests caused by a bug on the validation service [\#8322](https://github.com/decidim/decidim/pull/8322) +- **decidim-core**: Remove npm decidim packages with dependencies from other decidim packages [\#8330](https://github.com/decidim/decidim/pull/8330) +- **decidim-core**: Fix problems introduced by #8330 [\#8341](https://github.com/decidim/decidim/pull/8341) +- Update Node and NPM version [\#8343](https://github.com/decidim/decidim/pull/8343) +- Remove hack for CSS validation [\#8326](https://github.com/decidim/decidim/pull/8326) +- Update docs in migrating to webpacker [\#8349](https://github.com/decidim/decidim/pull/8349) +- **decidim-comments**: Ignore errors during comments migration task [\#8351](https://github.com/decidim/decidim/pull/8351) +- **decidim-meetings**: Fix published and title in seeded meetings [\#8359](https://github.com/decidim/decidim/pull/8359) +- **decidim-core**: Fix SQL to make version display faster [\#8393](https://github.com/decidim/decidim/pull/8393) +- Remove GraphQL deprecated API call [\#8432](https://github.com/decidim/decidim/pull/8432) +- **decidim-generators**: Fixing generator webpacker issues [\#8427](https://github.com/decidim/decidim/pull/8427) +- **decidim-generators**: Fix railties requirements on created applications [\#8415](https://github.com/decidim/decidim/pull/8415) +- **decidim-core**: Update omniauth gem and dependencies [\#8388](https://github.com/decidim/decidim/pull/8388) +- Document how to enable machine translations on organization [\#8458](https://github.com/decidim/decidim/pull/8458) +- **decidim-dev**: Improves manual installation documentation [\#8508](https://github.com/decidim/decidim/pull/8508) +- Update the i18n-tasks initialization syntax [\#8544](https://github.com/decidim/decidim/pull/8544) +- Documentation: improve develop section [\#8553](https://github.com/decidim/decidim/pull/8553) +- Change default window size in Capybara configuration [\#8576](https://github.com/decidim/decidim/pull/8576) +- Fix security instructions [\#8587](https://github.com/decidim/decidim/pull/8587) +- Temporarily ignore CSS validation issue in CI [\#8597](https://github.com/decidim/decidim/pull/8597) +- Update nokogiri to 1.12.5 [\#8609](https://github.com/decidim/decidim/pull/8609) +- Update paper_trail to 12.1 [\#8608](https://github.com/decidim/decidim/pull/8608) +- Update ruby to 2.7.5 [\#8629](https://github.com/decidim/decidim/pull/8629) +- Remove truncato dependency [\#8507](https://github.com/decidim/decidim/pull/8507) +- Change figaro to rbenv-vars in "manual installation" documentation [\#8575](https://github.com/decidim/decidim/pull/8575) +- Add instructions PostgreSQL configuration in development app [\#8618](https://github.com/decidim/decidim/pull/8618) +- Fix etherpad doc reference in initializer [\#8632](https://github.com/decidim/decidim/pull/8632) +- Clarifies git branches conventions in doc [\#8644](https://github.com/decidim/decidim/pull/8644) +- Fix changelog link [\#8671](https://github.com/decidim/decidim/pull/8671) +- Enable simplecov only for rspec step [\#8674](https://github.com/decidim/decidim/pull/8674) +- **decidim-dev**: Improve machine translation documentation and comments [\#8668](https://github.com/decidim/decidim/pull/8668) +- Split the workflows files for CI [\#8675](https://github.com/decidim/decidim/pull/8675) +- DRY GitHub workflows with composite actions [\#8677](https://github.com/decidim/decidim/pull/8677) +- Change Gitter to Matrix.org in documentation [\#8466](https://github.com/decidim/decidim/pull/8466) ## Previous versions -Please check [release/0.24-stable](https://github.com/decidim/decidim/blob/release/0.24-stable/CHANGELOG.md) for previous changes. +Please check [release/0.25-stable](https://github.com/decidim/decidim/blob/release/0.25-stable/CHANGELOG.md) for previous changes. diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index 5c91a36f64150..24f607c2298aa 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -1,11 +1,13 @@ = How to contribute to Decidim -We're really glad you're reading this, because we need volunteer developers to help this project come to fruition. - -If you haven't already, come find us in https://gitter.im/decidim/decidim[Gitter]. We want you working on things you're excited about. +We're really glad you're reading this, because we need volunteer contributors to help this project come to fruition. Please note that by making a Pull Request in this repository you're agreeing with https://decidim.org/contract[Decidim's Social Contract]. +== Do you want to say hello to us? + +Come find us at https://matrix.to/#/#decidim:matrix.org[our Matrix.org space]. We have chat rooms for developers, designers and translators. + == Did you find a bug? * *Do not open up a GitHub issue if the bug is a security vulnerability in Decidim*, and instead send us an email to security [at] decidim.org. @@ -21,7 +23,7 @@ Be sure to include a *title and clear description*, as much relevant information Include the relevant issue number if applicable. * Check our https://docs.decidim.org/en/develop/guide/[development_guide]. * When the PR includes a breaking change or includes something that requires manual intervention when deploying, it's necessary to add it on the changelog upgrade notes. -See https://docs.decidim.org/en/develop/guide_changelog/[rules for the changelog page in docs]. +See https://docs.decidim.org/en/develop/guide_conventions/#_changelog[rules for the changelog page in docs]. == Do you intend to add a new feature or change an existing one? @@ -37,7 +39,7 @@ You can read in detail about this process in https://docs.decidim.org/en/governa == Do you have questions about the source code? -* Ask any question about how to use Decidim in https://gitter.im/decidim/decidim[Gitter]. +* Ask any question about how to use Decidim in https://matrix.to/#/#decidimdevs:matrix.org[our Decidim Devs Matrix chat room]. == Do you want to contribute to Decidim documentation? diff --git a/Dockerfile.design b/Dockerfile.design index be47c1e76932f..732d10c38f015 100644 --- a/Dockerfile.design +++ b/Dockerfile.design @@ -1,4 +1,4 @@ -FROM ruby:2.7.1 +FROM ruby:2.7.5 LABEL maintainer="info@codegram.com" ENV LANG C.UTF-8 diff --git a/Gemfile b/Gemfile index ea9b4db088074..36a8274c232ce 100644 --- a/Gemfile +++ b/Gemfile @@ -27,6 +27,8 @@ group :development, :test do gem "simplecov", "~> 0.19.0" gem "decidim-dev", path: "." + + gem "brakeman", "~> 5.1" end group :development do diff --git a/Gemfile.lock b/Gemfile.lock index 8f684cf1e20fa..3ed050bce7ec3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,65 +11,64 @@ GIT PATH remote: . specs: - decidim (0.25.2) - decidim-accountability (= 0.25.2) - decidim-admin (= 0.25.2) - decidim-api (= 0.25.2) - decidim-assemblies (= 0.25.2) - decidim-blogs (= 0.25.2) - decidim-budgets (= 0.25.2) - decidim-comments (= 0.25.2) - decidim-core (= 0.25.2) - decidim-debates (= 0.25.2) - decidim-forms (= 0.25.2) - decidim-generators (= 0.25.2) - decidim-meetings (= 0.25.2) - decidim-pages (= 0.25.2) - decidim-participatory_processes (= 0.25.2) - decidim-proposals (= 0.25.2) - decidim-sortitions (= 0.25.2) - decidim-surveys (= 0.25.2) - decidim-system (= 0.25.2) - decidim-templates (= 0.25.2) - decidim-verifications (= 0.25.2) - decidim-accountability (0.25.2) - decidim-comments (= 0.25.2) - decidim-core (= 0.25.2) - decidim-admin (0.25.2) + decidim (0.26.4) + decidim-accountability (= 0.26.4) + decidim-admin (= 0.26.4) + decidim-api (= 0.26.4) + decidim-assemblies (= 0.26.4) + decidim-blogs (= 0.26.4) + decidim-budgets (= 0.26.4) + decidim-comments (= 0.26.4) + decidim-core (= 0.26.4) + decidim-debates (= 0.26.4) + decidim-forms (= 0.26.4) + decidim-generators (= 0.26.4) + decidim-meetings (= 0.26.4) + decidim-pages (= 0.26.4) + decidim-participatory_processes (= 0.26.4) + decidim-proposals (= 0.26.4) + decidim-sortitions (= 0.26.4) + decidim-surveys (= 0.26.4) + decidim-system (= 0.26.4) + decidim-templates (= 0.26.4) + decidim-verifications (= 0.26.4) + decidim-accountability (0.26.4) + decidim-comments (= 0.26.4) + decidim-core (= 0.26.4) + decidim-admin (0.26.4) active_link_to (~> 1.0) - decidim-core (= 0.25.2) + decidim-core (= 0.26.4) devise (~> 4.7) devise-i18n (~> 1.2) devise_invitable (~> 2.0) - decidim-api (0.25.2) - graphql (~> 1.12, >= 1.12.3) + decidim-api (0.26.4) + graphql (~> 1.12, < 1.13) rack-cors (~> 1.0) redcarpet (~> 3.5, >= 3.5.1) - decidim-assemblies (0.25.2) - decidim-core (= 0.25.2) - decidim-blogs (0.25.2) - decidim-admin (= 0.25.2) - decidim-comments (= 0.25.2) - decidim-core (= 0.25.2) - decidim-budgets (0.25.2) - decidim-comments (= 0.25.2) - decidim-core (= 0.25.2) - decidim-comments (0.25.2) - decidim-core (= 0.25.2) + decidim-assemblies (0.26.4) + decidim-core (= 0.26.4) + decidim-blogs (0.26.4) + decidim-admin (= 0.26.4) + decidim-comments (= 0.26.4) + decidim-core (= 0.26.4) + decidim-budgets (0.26.4) + decidim-comments (= 0.26.4) + decidim-core (= 0.26.4) + decidim-comments (0.26.4) + decidim-core (= 0.26.4) redcarpet (~> 3.5, >= 3.5.1) - decidim-conferences (0.25.2) - decidim-core (= 0.25.2) - decidim-meetings (= 0.25.2) + decidim-conferences (0.26.4) + decidim-core (= 0.26.4) + decidim-meetings (= 0.26.4) wicked_pdf (~> 2.1) wkhtmltopdf-binary (~> 0.12) - decidim-consultations (0.25.2) - decidim-admin (= 0.25.2) - decidim-comments (= 0.25.2) - decidim-core (= 0.25.2) - decidim-core (0.25.2) + decidim-consultations (0.26.4) + decidim-admin (= 0.26.4) + decidim-comments (= 0.26.4) + decidim-core (= 0.26.4) + decidim-core (0.26.4) active_link_to (~> 1.0) acts_as_list (~> 0.9) - anchored (~> 1.1) batch-loader (~> 1.2) browser (~> 2.7) carrierwave (~> 2.2.1) @@ -77,30 +76,29 @@ PATH cells-rails (~> 0.1.3) charlock_holmes (~> 0.7) date_validator (~> 0.9.0) - decidim-api (= 0.25.2) + decidim-api (= 0.26.4) devise (~> 4.7) devise-i18n (~> 1.2) diffy (~> 3.3) doorkeeper (~> 5.1) doorkeeper-i18n (~> 4.0) - etherpad-lite (~> 0.3) file_validators (~> 2.1) fog-local (~> 0.6) foundation_rails_helper - geocoder (~> 1.5) + geocoder (~> 1.7.5) hashdiff (>= 0.4.0, < 2.0.0) invisible_captcha (~> 0.12) kaminari (~> 1.2, >= 1.2.1) loofah (~> 2.3.1) + mime-types (>= 1.16, < 4.0) mini_magick (~> 4.9) mustache (~> 1.1.0) - nobspw (~> 0.6.0) omniauth (~> 2.0) omniauth-facebook (~> 5.0) omniauth-google-oauth2 (~> 1.0) omniauth-rails_csrf_protection (~> 1.0) omniauth-twitter (~> 1.4) - paper_trail (~> 10.3) + paper_trail (~> 12.0) pg (~> 1.1.4, < 2) pg_search (~> 2.2) premailer-rails (~> 1.10) @@ -117,24 +115,23 @@ PATH searchlight (~> 4.1) seven_zip_ruby (~> 1.3) social-share-button (~> 1.2, >= 1.2.1) - truncato (~> 0.7) valid_email2 (~> 2.1) webpacker (= 6.0.0.rc.5) wisper (~> 2.0) - decidim-debates (0.25.2) - decidim-comments (= 0.25.2) - decidim-core (= 0.25.2) - decidim-dev (0.25.2) + decidim-debates (0.26.4) + decidim-comments (= 0.26.4) + decidim-core (= 0.26.4) + decidim-dev (0.26.4) axe-core-rspec (~> 4.1.0) byebug (~> 11.0) capybara (~> 3.24) db-query-matchers (~> 0.10.0) - decidim (= 0.25.2) + decidim (= 0.26.4) erb_lint (~> 0.0.35) factory_bot_rails (~> 4.8) i18n-tasks (~> 0.9.18) mdl (~> 0.5) - nokogiri (~> 1.11, >= 1.11.4) + nokogiri (~> 1.12) puma (~> 5.0) rails-controller-testing (~> 1.0) rspec-cells (~> 0.3.4) @@ -152,63 +149,63 @@ PATH w3c_rspec_validators (~> 0.3.0) webmock (~> 3.6) wisper-rspec (~> 1.0) - decidim-elections (0.25.2) - decidim-bulletin_board (= 0.21.2) - decidim-core (= 0.25.2) - decidim-forms (= 0.25.2) - decidim-proposals (= 0.25.2) + decidim-elections (0.26.4) + decidim-bulletin_board (= 0.22.3) + decidim-core (= 0.26.4) + decidim-forms (= 0.26.4) + decidim-proposals (= 0.26.4) rack-attack (~> 6.0) - voting_schemes-dummy (= 0.21.2) - voting_schemes-electionguard (= 0.21.2) - decidim-forms (0.25.2) - decidim-core (= 0.25.2) + voting_schemes-dummy (= 0.22.3) + voting_schemes-electionguard (= 0.22.3) + decidim-forms (0.26.4) + decidim-core (= 0.26.4) wicked_pdf (~> 2.1) wkhtmltopdf-binary (~> 0.12) - decidim-generators (0.25.2) - decidim-core (= 0.25.2) - decidim-initiatives (0.25.2) - decidim-admin (= 0.25.2) - decidim-comments (= 0.25.2) - decidim-core (= 0.25.2) - decidim-verifications (= 0.25.2) + decidim-generators (0.26.4) + decidim-core (= 0.26.4) + decidim-initiatives (0.26.4) + decidim-admin (= 0.26.4) + decidim-comments (= 0.26.4) + decidim-core (= 0.26.4) + decidim-verifications (= 0.26.4) origami (~> 2.1) virtus-multiparams (~> 0.1) wicked (~> 1.3) wicked_pdf (~> 2.1) wkhtmltopdf-binary (~> 0.12) - decidim-meetings (0.25.2) - decidim-core (= 0.25.2) - decidim-forms (= 0.25.2) + decidim-meetings (0.26.4) + decidim-core (= 0.26.4) + decidim-forms (= 0.26.4) icalendar (~> 2.5) - decidim-pages (0.25.2) - decidim-core (= 0.25.2) - decidim-participatory_processes (0.25.2) - decidim-core (= 0.25.2) - decidim-proposals (0.25.2) - decidim-comments (= 0.25.2) - decidim-core (= 0.25.2) - doc2text (~> 0.4.3) + decidim-pages (0.26.4) + decidim-core (= 0.26.4) + decidim-participatory_processes (0.26.4) + decidim-core (= 0.26.4) + decidim-proposals (0.26.4) + decidim-comments (= 0.26.4) + decidim-core (= 0.26.4) + doc2text (~> 0.4.4) redcarpet (~> 3.5, >= 3.5.1) - decidim-sortitions (0.25.2) - decidim-admin (= 0.25.2) - decidim-comments (= 0.25.2) - decidim-core (= 0.25.2) - decidim-proposals (= 0.25.2) - decidim-surveys (0.25.2) - decidim-core (= 0.25.2) - decidim-forms (= 0.25.2) - decidim-templates (= 0.25.2) - decidim-system (0.25.2) + decidim-sortitions (0.26.4) + decidim-admin (= 0.26.4) + decidim-comments (= 0.26.4) + decidim-core (= 0.26.4) + decidim-proposals (= 0.26.4) + decidim-surveys (0.26.4) + decidim-core (= 0.26.4) + decidim-forms (= 0.26.4) + decidim-templates (= 0.26.4) + decidim-system (0.26.4) active_link_to (~> 1.0) - decidim-core (= 0.25.2) + decidim-core (= 0.26.4) devise (~> 4.7) devise-i18n (~> 1.2) devise_invitable (~> 2.0) - decidim-templates (0.25.2) - decidim-core (= 0.25.2) - decidim-forms (= 0.25.2) - decidim-verifications (0.25.2) - decidim-core (= 0.25.2) + decidim-templates (0.26.4) + decidim-core (= 0.26.4) + decidim-forms (= 0.26.4) + decidim-verifications (0.26.4) + decidim-core (= 0.26.4) GEM remote: https://rubygems.org/ @@ -275,9 +272,8 @@ GEM activerecord (>= 3.0) addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) - anchored (1.1.0) ast (2.4.2) - axe-core-api (4.3.2) + axe-core-api (4.4.2) dumb_delegator virtus axe-core-rspec (4.1.0) @@ -289,7 +285,7 @@ GEM ice_nine (~> 0.11.0) thread_safe (~> 0.3, >= 0.3.1) batch-loader (1.5.0) - bcrypt (3.1.16) + bcrypt (3.1.18) better_html (1.0.16) actionview (>= 4.0) activesupport (>= 4.0) @@ -301,10 +297,11 @@ GEM bindex (0.8.1) bootsnap (1.7.5) msgpack (~> 1.0) + brakeman (5.1.1) browser (2.7.1) builder (3.2.4) byebug (11.1.3) - capybara (3.36.0) + capybara (3.38.0) addressable matrix mini_mime (>= 0.1.3) @@ -329,11 +326,11 @@ GEM cells-erb (0.1.0) cells (~> 4.0) erbse (>= 0.1.1) - cells-rails (0.1.4) + cells-rails (0.1.5) actionpack (>= 5.0) cells (>= 4.1.6, < 5.0.0) charlock_holmes (0.7.7) - chef-utils (17.7.29) + chef-utils (18.0.172) concurrent-ruby childprocess (3.0.0) coercible (1.0.0) @@ -350,7 +347,7 @@ GEM crack (0.4.5) rexml crass (1.0.6) - css_parser (1.10.0) + css_parser (1.12.0) addressable date_validator (0.9.0) activemodel @@ -358,37 +355,35 @@ GEM db-query-matchers (0.10.0) activesupport (>= 4.0, < 7) rspec (~> 3.0) - decidim-bulletin_board (0.21.2) + decidim-bulletin_board (0.22.3) byebug (~> 11.0) graphlient (~> 0.4.0) jwt (~> 2.2.2) - rails (>= 5.0.0) + rails (~> 6.0, >= 5.0.0) wisper (~> 2.0.0) declarative-builder (0.1.0) declarative-option (< 0.2.0) declarative-option (0.1.0) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) - devise (4.8.0) + devise (4.8.1) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) responders warden (~> 1.2.3) - devise-i18n (1.10.1) + devise-i18n (1.10.2) devise (>= 4.8.0) - devise_invitable (2.0.5) + devise_invitable (2.0.6) actionmailer (>= 5.0) devise (>= 4.6) - diff-lcs (1.4.4) - diffy (3.4.0) - doc2text (0.4.3) - nokogiri (~> 1.11.1) + diff-lcs (1.5.0) + diffy (3.4.2) + doc2text (0.4.4) + nokogiri (>= 1.12.5, < 1.13.0) rubyzip (~> 2.3.0) docile (1.4.0) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) - doorkeeper (5.5.4) + doorkeeper (5.6.0) railties (>= 5) doorkeeper-i18n (4.0.1) dumb_delegator (1.0.0) @@ -404,9 +399,7 @@ GEM erbse (0.1.4) temple erubi (1.10.0) - etherpad-lite (0.3.0) - rest-client (>= 1.6) - excon (0.88.0) + excon (0.93.1) execjs (2.8.1) factory_bot (4.11.1) activesupport (>= 3.0.0) @@ -415,61 +408,62 @@ GEM railties (>= 3.0.0) faker (2.18.0) i18n (>= 1.6, < 2) - faraday (1.8.0) + faraday (1.10.2) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) - faraday-httpclient (~> 1.0.1) + faraday-httpclient (~> 1.0) + faraday-multipart (~> 1.0) faraday-net_http (~> 1.0) - faraday-net_http_persistent (~> 1.1) + faraday-net_http_persistent (~> 1.0) faraday-patron (~> 1.0) faraday-rack (~> 1.0) - multipart-post (>= 1.2, < 3) + faraday-retry (~> 1.0) ruby2_keywords (>= 0.0.4) faraday-em_http (1.0.0) faraday-em_synchrony (1.0.0) faraday-excon (1.1.0) faraday-httpclient (1.0.1) + faraday-multipart (1.0.4) + multipart-post (~> 2) faraday-net_http (1.0.1) faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) faraday-rack (1.0.0) + faraday-retry (1.0.3) faraday_middleware (1.2.0) faraday (~> 1.0) ffi (1.15.1) file_validators (2.3.0) activemodel (>= 3.2) mime-types (>= 1.0) - fog-core (2.2.4) + fog-core (2.3.0) builder excon (~> 0.71) - formatador (~> 0.2) + formatador (>= 0.2, < 2.0) mime-types - fog-local (0.7.0) + fog-local (0.8.0) fog-core (>= 1.27, < 3.0) - formatador (0.3.0) - geocoder (1.7.0) + formatador (1.1.0) + geocoder (1.7.5) globalid (0.5.2) activesupport (>= 5.0) graphlient (0.4.0) faraday (>= 1.0) faraday_middleware graphql-client - graphql (1.12.20) - graphql-client (0.17.0) + graphql (1.12.24) + graphql-client (0.18.0) activesupport (>= 3.0) - graphql (~> 1.10) + graphql hashdiff (1.0.1) hashie (5.0.0) highline (2.0.3) html_tokenizer (0.0.7) htmlentities (4.3.4) - http-accept (1.7.0) - http-cookie (1.0.4) - domain_name (~> 0.5) i18n (1.8.11) concurrent-ruby (~> 1.0) - i18n-tasks (0.9.35) + i18n-tasks (0.9.37) activesupport (>= 4.0.2) ast (>= 2.1.0) erubi @@ -479,30 +473,30 @@ GEM rails-i18n rainbow (>= 2.2.2, < 4.0) terminal-table (>= 1.5.1) - icalendar (2.7.1) + icalendar (2.8.0) ice_cube (~> 0.16) ice_cube (0.16.4) ice_nine (0.11.2) - image_processing (1.12.1) + image_processing (1.12.2) mini_magick (>= 4.9.5, < 5) ruby-vips (>= 2.0.17, < 3) invisible_captcha (0.13.0) rails (>= 3.2.0) - json (2.6.1) + json (2.6.2) jwt (2.2.3) - kaminari (1.2.1) + kaminari (1.2.2) activesupport (>= 4.1.0) - kaminari-actionview (= 1.2.1) - kaminari-activerecord (= 1.2.1) - kaminari-core (= 1.2.1) - kaminari-actionview (1.2.1) + kaminari-actionview (= 1.2.2) + kaminari-activerecord (= 1.2.2) + kaminari-core (= 1.2.2) + kaminari-actionview (1.2.2) actionview - kaminari-core (= 1.2.1) - kaminari-activerecord (1.2.1) + kaminari-core (= 1.2.2) + kaminari-activerecord (1.2.2) activerecord - kaminari-core (= 1.2.1) - kaminari-core (1.2.1) - kramdown (2.3.1) + kaminari-core (= 1.2.2) + kaminari-core (1.2.2) + kramdown (2.4.0) rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) @@ -524,7 +518,7 @@ GEM mini_mime (>= 0.1.1) marcel (1.0.2) matrix (0.4.2) - mdl (0.11.0) + mdl (0.12.0) kramdown (~> 2.3) kramdown-parser-gfm (~> 1.1) mixlib-cli (~> 2.1, >= 2.1.1) @@ -533,52 +527,55 @@ GEM method_source (1.0.0) mime-types (3.4.1) mime-types-data (~> 3.2015) - mime-types-data (3.2021.1115) + mime-types-data (3.2022.0105) mini_magick (4.11.0) mini_mime (1.1.1) - mini_portile2 (2.5.3) + mini_portile2 (2.6.1) minitest (5.14.4) mixlib-cli (2.1.8) - mixlib-config (3.0.9) + mixlib-config (3.0.27) tomlrb - mixlib-shellout (3.2.5) + mixlib-shellout (3.2.7) chef-utils msgpack (1.4.2) - multi_json (1.15.0) multi_xml (0.6.0) - multipart-post (2.1.1) + multipart-post (2.2.3) mustache (1.1.1) - netrc (0.11.0) nio4r (2.5.8) - nobspw (0.6.2) - nokogiri (1.11.7) - mini_portile2 (~> 2.5.0) + nokogiri (1.12.5) + mini_portile2 (~> 2.6.1) racc (~> 1.4) - oauth (0.5.8) - oauth2 (1.4.7) - faraday (>= 0.8, < 2.0) + oauth (1.1.0) + oauth-tty (~> 1.0, >= 1.0.1) + snaky_hash (~> 2.0) + version_gem (~> 1.1) + oauth-tty (1.0.5) + version_gem (~> 1.1, >= 1.1.1) + oauth2 (2.0.9) + faraday (>= 0.17.3, < 3.0) jwt (>= 1.0, < 3.0) - multi_json (~> 1.3) multi_xml (~> 0.5) - rack (>= 1.2, < 3) - omniauth (2.0.4) + rack (>= 1.2, < 4) + snaky_hash (~> 2.0) + version_gem (~> 1.1) + omniauth (2.1.0) hashie (>= 3.4.6) - rack (>= 1.6.2, < 3) + rack (>= 2.2.3) rack-protection omniauth-facebook (5.0.0) omniauth-oauth2 (~> 1.2) - omniauth-google-oauth2 (1.0.0) + omniauth-google-oauth2 (1.1.1) jwt (>= 2.0) - oauth2 (~> 1.1) + oauth2 (~> 2.0.6) omniauth (~> 2.0) - omniauth-oauth2 (~> 1.7.1) + omniauth-oauth2 (~> 1.8.0) omniauth-oauth (1.2.0) oauth omniauth (>= 1.0, < 3) - omniauth-oauth2 (1.7.2) - oauth2 (~> 1.4) - omniauth (>= 1.9, < 3) - omniauth-rails_csrf_protection (1.0.0) + omniauth-oauth2 (1.8.0) + oauth2 (>= 1.4, < 3) + omniauth (~> 2.0) + omniauth-rails_csrf_protection (1.0.1) actionpack (>= 4.2) omniauth (~> 2.0) omniauth-twitter (1.4.0) @@ -587,19 +584,19 @@ GEM origami (2.1.0) colorize (~> 0.7) orm_adapter (0.5.0) - paper_trail (10.3.1) - activerecord (>= 4.2) + paper_trail (12.3.0) + activerecord (>= 5.2) request_store (~> 1.1) parallel (1.20.1) parser (3.0.2.0) ast (~> 2.4.1) pg (1.1.4) - pg_search (2.3.5) + pg_search (2.3.6) activerecord (>= 5.2) activesupport (>= 5.2) - premailer (1.15.0) + premailer (1.18.0) addressable - css_parser (>= 1.6.0) + css_parser (>= 1.12.0) htmlentities (>= 4.0.0) premailer-rails (1.11.1) actionmailer (>= 3) @@ -609,13 +606,13 @@ GEM nio4r (~> 2.0) racc (1.6.0) rack (2.2.3) - rack-attack (6.5.0) + rack-attack (6.6.1) rack (>= 1.0, < 3) rack-cors (1.1.1) rack (>= 2.0.0) - rack-protection (2.1.0) + rack-protection (3.0.2) rack - rack-proxy (0.7.0) + rack-proxy (0.7.4) rack rack-test (1.1.0) rack (>= 1.0, < 3) @@ -668,37 +665,32 @@ GEM virtus (~> 1.0.5) wisper (>= 1.6.1) redcarpet (3.5.1) - redis (4.5.1) + redis (4.8.0) regexp_parser (2.1.1) - request_store (1.5.0) + request_store (1.5.1) rack (>= 1.4) responders (3.0.1) actionpack (>= 5.0) railties (>= 5.0) - rest-client (2.1.0) - http-accept (>= 1.7.0, < 2.0) - http-cookie (>= 1.0.2, < 2.0) - mime-types (>= 1.16, < 4.0) - netrc (~> 0.8) rexml (3.2.5) - rspec (3.10.0) - rspec-core (~> 3.10.0) - rspec-expectations (~> 3.10.0) - rspec-mocks (~> 3.10.0) - rspec-cells (0.3.7) + rspec (3.12.0) + rspec-core (~> 3.12.0) + rspec-expectations (~> 3.12.0) + rspec-mocks (~> 3.12.0) + rspec-cells (0.3.8) cells (>= 4.0.0, < 6.0.0) - rspec-rails (< 6.0) - rspec-core (3.10.1) - rspec-support (~> 3.10.0) - rspec-expectations (3.10.1) + rspec-rails (>= 3.0.0, < 6.1.0) + rspec-core (3.12.0) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) + rspec-support (~> 3.12.0) rspec-html-matchers (0.9.4) nokogiri (~> 1) rspec (>= 3.0.0.a, < 4) - rspec-mocks (3.10.2) + rspec-mocks (3.12.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) + rspec-support (~> 3.12.0) rspec-rails (4.1.2) actionpack (>= 4.2) activesupport (>= 4.2) @@ -709,7 +701,7 @@ GEM rspec-support (~> 3.10) rspec-retry (0.6.2) rspec-core (> 3.3) - rspec-support (3.10.3) + rspec-support (3.12.0) rspec_junit_formatter (0.3.0) rspec-core (>= 2, < 4, != 2.12.0) rubocop (0.92.0) @@ -736,7 +728,7 @@ GEM ruby-vips (2.1.4) ffi (~> 1.12) ruby2_keywords (0.0.5) - rubyXL (3.4.18) + rubyXL (3.4.25) nokogiri (>= 1.10.8) rubyzip (>= 1.3.0) rubyzip (2.3.2) @@ -752,43 +744,41 @@ GEM simplecov-cobertura (1.3.1) simplecov (~> 0.8) simplecov-html (0.12.3) - smart_properties (1.16.3) + smart_properties (1.17.0) + snaky_hash (2.0.1) + hashie + version_gem (~> 1.1, >= 1.1.1) social-share-button (1.2.4) coffee-rails spring (2.1.1) spring-watcher-listen (2.0.1) listen (>= 2.7, < 4.0) spring (>= 1.2, < 3.0) - sprockets (4.0.2) + sprockets (4.1.1) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.4.1) + sprockets-rails (3.4.2) actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - ssrf_filter (1.0.7) + ssrf_filter (1.1.1) system_test_html_screenshots (0.2.0) actionpack (>= 5.2, < 6.1.a) - temple (0.8.2) + temple (0.9.1) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) thor (1.1.0) thread_safe (0.3.6) - tilt (2.0.10) - tomlrb (2.0.1) - truncato (0.7.11) - htmlentities (~> 4.3.1) - nokogiri (>= 1.7.0, <= 2.0) + tilt (2.0.11) + tomlrb (2.0.3) tzinfo (1.2.9) thread_safe (~> 0.1) uber (0.1.0) - unf (0.1.4) - unf_ext - unf_ext (0.0.8) unicode-display_width (1.8.0) valid_email2 (2.3.1) activemodel (>= 3.2) mail (~> 2.5) + version_gem (1.1.1) virtus (1.0.5) axiom-types (~> 0.1) coercible (~> 1.0) @@ -796,15 +786,15 @@ GEM equalizer (~> 0.0, >= 0.0.9) virtus-multiparams (0.1.1) virtus (~> 1.0) - voting_schemes-dummy (0.21.2) + voting_schemes-dummy (0.22.3) rails (>= 5.0.0) - voting_schemes-electionguard (0.21.2) + voting_schemes-electionguard (0.22.3) rails (>= 5.0.0) w3c_rspec_validators (0.3.0) rails rspec w3c_validators - w3c_validators (1.3.6) + w3c_validators (1.3.7) json (>= 1.8) nokogiri (~> 1.6) rexml (~> 3.2) @@ -815,7 +805,7 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webmock (3.14.0) + webmock (3.18.1) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) @@ -827,13 +817,13 @@ GEM websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - wicked (1.3.4) + wicked (1.4.0) railties (>= 3.0.7) - wicked_pdf (2.1.0) + wicked_pdf (2.6.3) activesupport wisper (2.0.1) wisper-rspec (1.1.0) - wkhtmltopdf-binary (0.12.6.6) + wkhtmltopdf-binary (0.12.6.5) xpath (3.2.0) nokogiri (~> 1.8) zeitwerk (2.5.1) @@ -843,6 +833,7 @@ PLATFORMS DEPENDENCIES bootsnap (~> 1.4) + brakeman (~> 5.1) byebug (~> 11.0) decidim! decidim-conferences! @@ -863,7 +854,7 @@ DEPENDENCIES web-console (= 4.0.4) RUBY VERSION - ruby 2.7.1p83 + ruby 2.7.5p203 BUNDLED WITH - 2.2.18 + 2.3.5 diff --git a/README.adoc b/README.adoc index 86636ffadba86..af2273591ef9c 100644 --- a/README.adoc +++ b/README.adoc @@ -1,4 +1,4 @@ -:doctype: book +D:doctype: book image::https://cdn.rawgit.com/decidim/decidim/develop/logo.svg[Decidim Logo,400] @@ -15,7 +15,7 @@ All members of the Decidim community agree with http://www.decidim.org/contract/ ''' -image:https://img.shields.io/gem/v/decidim.svg[Gem,link=https://rubygems.org/gems/decidim] image:https://img.shields.io/gem/dt/decidim.svg[Gem,link=https://rubygems.org/gems/decidim] image:https://img.shields.io/github/contributors/decidim/decidim.svg[GitHub contributors,link=https://github.com/decidim/decidim/graphs/contributors] image:http://img.shields.io/badge/yard-docs-blue.svg[Yard Docs,link=http://rubydoc.info/github/decidim/decidim/master] image:https://img.shields.io/gitter/room/nwjs/nw.js.svg[Gitter,link=https://gitter.im/decidim/decidim] +image:https://img.shields.io/gem/v/decidim.svg[Gem,link=https://rubygems.org/gems/decidim] image:https://img.shields.io/gem/dt/decidim.svg[Gem,link=https://rubygems.org/gems/decidim] image:https://img.shields.io/github/contributors/decidim/decidim.svg[GitHub contributors,link=https://github.com/decidim/decidim/graphs/contributors] image:http://img.shields.io/badge/yard-docs-blue.svg[Yard Docs,link=http://rubydoc.info/github/decidim/decidim/master] image:https://img.shields.io/matrix/decidimdevs:matrix.org[Matrix,link=https://matrix.to/#/#decidimdevs:matrix.org] Code quality @@ -85,60 +85,29 @@ If you need to have some features that we don't have yet, we recommend that you This is a Ruby on Rails engine with some APIs specific to Decidim (for registering with the menus, integration with spaces like Participatory Processes or Assemblies, with /admin or /api, etc). As a base you can use these modules, although check first that the version is compatible with your current Decidim version. -Also you should know that until v1.0.0 We're under development and these internal APIs can change. +Also, you should know that until v1.0.0 We're under development, and these internal APIs can change. + We recommend that you extensively test your module. See https://decidim.org/modules[Modules page on Decidim.org]. === Authorizations Strategies -One specific thing regarding these kind of applications is the xref:decidim-verifications/README.adoc[authorization/verification] logic. -Here are some examples: - -- https://github.com/AjuntamentdeBarcelona/decidim-barcelona/blob/master/app/services/census_authorization_handler.rb[Barcelona (City)] -- https://github.com/AjuntamentdeCalafell/decidim-calafell/blob/master/app/services/census_authorization_handler.rb[Calafell] -- https://github.com/diputacioBCN/decidim-diba/blob/master/decidim-diba_census_api/app/services/diba_census_api_authorization_handler.rb[DIBA (Barcelona Province)] -- https://github.com/AjuntamentDeGava/decidim-gava/blob/master/app/services/census_authorization_handler.rb[Gavà] -- https://github.com/HospitaletDeLlobregat/decidim-hospitalet/blob/master/app/services/census_authorization_handler.rb[Hospitalet de Llobregat] -- https://github.com/AjMalgrat/decidim-malgrat/blob/master/app/services/carpetaciutada_handler.rb[Malgrat de Mar] -- https://github.com/AjuntamentDeMataro/decidimmataro.cat/blob/master/app/services/census_authorization_handler.rb[Mataró] -- https://github.com/ErabakiPamplona/erabaki/blob/master/app/services/census_authorization_handler.rb[Pamplona] -- https://github.com/AjuntamentdeReus/decidim/blob/master/app/services/census_authorization_handler.rb[Reus] -- https://github.com/AjuntamentDeSabadell/decidim-sabadell/blob/master/app/services/census_authorization_handler.rb[Sabadell] -- https://github.com/AjuntamentdeSantCugat/decidim-sant_cugat/blob/master/app/services/census_authorization_handler.rb[Sant Cugat] -- https://github.com/AjuntamentDeTerrassa/decidim-terrassa/blob/master/app/services/census_authorization_handler.rb[Terrassa] -- https://github.com/vilanovailageltru/decidim-vilanova/blob/master/app/services/vilanova_authorization_handler.rb[Vilanova i la Geltrú] - -Other special verifications: - -- https://github.com/podemos-info/participa2/tree/master/decidim-module-census_connector[Podemos] -- https://github.com/ElectricThings/fund_action/blob/master/app/services/anybody_authorization_handler.rb[FundAction] -- https://github.com/CodiTramuntana/decidim-verifications-csv_emails[CSV emails] -- https://github.com/mainio/decidim-module-access_requests[Access Requests] +One specific thing regarding these kind of applications is the authorization or verification logic. This tries to solve the problem of how to verify that the user is who they say they are and that they have the right to participate in this city or organization. Read more about https://docs.decidim.org/en/customize/authorizations/[Authorizations] in our documentation. == Following our license -If you plan to release your application you'll need to publish it using the same license: GPL Affero 3. -We recommend doing that on GitHub before publishing, you can read more on "http://producingoss.com/en/governments-and-open-source.html#starting-open-for-govs[Being Open Source From Day One is Especially Important for Government Projects]". -If you have any trouble you can contact us on https://gitter.im/decidim/decidim[Gitter]. +If you plan to put your application in production, you'll need to publish it using the same license: GPL Affero 3. + +We recommend doing that on GitHub (or any other code hosting platform) before publishing. + +You can read more on "http://producingoss.com/en/governments-and-open-source.html#starting-open-for-govs[Being Open Source From Day One is Especially Important for Government Projects]". + +If you have any trouble you can contact us on https://app.element.io/#/room/#decidimdevs:matrix.org[our Matrix.org chat room for developers]. == Example applications -Since Decidim is a ruby gem, you can check out the https://github.com/decidim/decidim/network/dependents?type=application[dependent repositories] to see how many applications are on the wild or tests that other developers have made. -Here's a partial list with some of the projects that have used Decidim: - -- http://staging.decidim.codegram.com[Demo] -- https://decidim.barcelona[Decidim Barcelona] - https://github.com/AjuntamentdeBarcelona/decidim-barcelona[View code] -- https://www.lhon-participa.cat[L'H ON Participa] - https://github.com/HospitaletDeLlobregat/decidim-hospitalet[View code] -- https://participa.terrassa.cat[Decidim Terrassa] - https://github.com/AjuntamentDeTerrassa/decidim-terrassa[View code] -- https://decidim.sabadell.cat[Decidim Sabadell] - https://github.com/AjuntamentDeSabadell/decidim-sabadell[View code] -- https://participa.gavaciutat.cat[Decidim Gavà] - https://github.com/AjuntamentDeGava/decidim-gava[View code] -- https://dialogluzern.ch[Dialog Luzern] - https://github.com/stadtluzern/decidim-ocl[View code] -- https://decidim.santcugat.cat/[Decidim Sant Cugat] - https://github.com/AjuntamentdeSantCugat/decidim-sant_cugat[View code] -- http://participa.vilanova.cat[Vilanova Participa] - https://github.com/vilanovailageltru/decidim-vilanova[View code] -- https://erabaki.pamplona.es[Erabaki Pamplona] - https://github.com/ErabakiPamplona/erabaki[View code] -- https://www.decidimmataro.cat[Decidim Mataró] - https://github.com/AjuntamentDeMataro/decidim-mataro[View code] -- https://meta.decidim.barcelona/[MetaDecidim] - https://github.com/decidim/metadecidim[View Code] +Since Decidim is a ruby gem, you can check out the https://github.com/decidim/decidim/network/dependents?type=application[dependent repositories] to see how many applications are on the wild or tests that other developers have made. You can see a highlight of https://docs.decidim.org/en/develop/guide_example_apps/[example applications] in our documentation. == Security diff --git a/Rakefile b/Rakefile index 7bb0cf9df3e5c..51ef610b05a3a 100644 --- a/Rakefile +++ b/Rakefile @@ -57,17 +57,36 @@ task :uninstall_all do end desc "Pushes a new build for each gem and package." -task release_all: [:update_versions, :check_locale_completeness] do - Decidim::GemManager.run_all("rake release") - Decidim::GemManager.run_packages("npm publish --access public") +task release_all: [:update_versions, :check_uncommitted_changes, :check_locale_completeness] do + commands = {} + Decidim::GemManager.all_dirs { |dir| commands[dir] = "rake release" } + Decidim::GemManager.package_dirs { |dir| commands[dir] = "npm publish --access public" } + + commands.each do |dir, command| + status = Decidim::GemManager.run_at(dir, command) + + break if !status && Decidim::GemManager.fail_fast? + end +end + +desc "Makes sure there are no uncommitted changes." +task :check_uncommitted_changes do + unless system("git diff --exit-code --quiet") + puts "There are uncommitted changes, run `git diff` to see them." + abort "Please commit your changes before release!" + end end desc "Makes sure all official locales are complete and clean." task :check_locale_completeness do - system({ "ENFORCED_LOCALES" => "en,ca,es", "SKIP_NORMALIZATION" => "true" }, "rspec spec/i18n_spec.rb") + unless system({ "ENFORCED_LOCALES" => "en,ca,es", "SKIP_NORMALIZATION" => "true" }, "rspec spec/i18n_spec.rb") + puts "The officially supported locales have problems in them." + abort "Please correct these problems by following the instructions from the above outputs before release!" + end end load "decidim-dev/lib/tasks/generators.rake" +load "lib/tasks/common_passwords_tasks.rake" desc "Generates a dummy app for testing" task test_app: "decidim:generate_external_test_app" diff --git a/SECURITY.adoc b/SECURITY.adoc index 4b94f3e5313e6..5976fd090631a 100644 --- a/SECURITY.adoc +++ b/SECURITY.adoc @@ -7,10 +7,10 @@ Until we have the version 1.0 we support only the last minor and major version w |=== | Version | Supported -| 0.24.x +| 0.25.x | :white_check_mark: -| \<= 0.23 +| \<= 0.24 | :x: |=== @@ -26,5 +26,5 @@ To download our key: [source,bash] ---- -gpg --keyserver pgp.key-server.io --recv 84B935C4 +gpg --keyserver pgp.mit.edu --recv 84B935C4 ---- diff --git a/bin/changelog_generator b/bin/changelog_generator index 0b3c1e0d389ae..837a82847d55a 100755 --- a/bin/changelog_generator +++ b/bin/changelog_generator @@ -117,6 +117,10 @@ types = { label: "type: removal", skip_modules: false }, + "Internal" => { + label: "type: internal", + skip_modules: true + }, "Developer improvements" => { label: "target: developer-experience", skip_modules: true diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml index de9e13f1a9224..2d6367dcd2106 100644 --- a/config/i18n-tasks.yml +++ b/config/i18n-tasks.yml @@ -121,6 +121,7 @@ ignore_unused: - activerecord.models.* - booleans.* - '{date,time.formats}.*' + - datetime.distance_in_words.* - decidim.admin.participatory_process_steps.default_title - decidim.authorization_handlers.{direct,multistep} - decidim.admin.models.assembly_member.positions.* @@ -164,6 +165,7 @@ ignore_unused: - decidim.accountability.models.project.valid_statuses.* - decidim.accountability.admin_log.* - decidim.elections.admin_log.* + - decidim.elections.connection.failed.* - decidim.elections.orders.* - decidim.elections.election_m.* - decidim.proposals.admin_log.* @@ -304,7 +306,17 @@ ignore_unused: - decidim.admin.menu.questions_submenu.attachments - decidim.admin.menu.questions_submenu.categories - decidim.meetings.public_participants_list.hidden_participants_count.* - + - decidim.budgets.budgets_list.* + - decidim.budgets.projects.project_budget_button.* + - decidim.meetings.meetings.show.withdraw_btn_hint + - decidim.meetings.meetings.show.withdraw_confirmation_html + - decidim.meetings.meetings.show.withdraw_meeting + - decidim.proposals.proposals.show.withdraw_btn_hint + - decidim.proposals.proposals.show.withdraw_confirmation_html + - decidim.proposals.proposals.show.withdraw_proposal + - decidim.assemblies.admin.assembly_members.form.explanation + - decidim.assemblies.admin.assembly_members.form.image_guide + - decidim.assemblies.admin.assembly_members.form.non_user_avatar_help ## Exclude these keys from the `i18n-tasks eq-base' report: # ignore_eq_base: diff --git a/crowdin.yaml b/crowdin.yaml index bf1aab7ee4503..c8ec1bce62c2f 100644 --- a/crowdin.yaml +++ b/crowdin.yaml @@ -36,8 +36,9 @@ files: nl: nl no: no pl: pl - pt-BR: pt-BR + pt: pt pt-PT: pt + pt-BR: pt-BR ro-RO: ro rumany: ru sk: sk diff --git a/decidim-accountability/app/packs/images/decidim/accountability/decidim_accountability_icon.svg b/decidim-accountability/app/packs/images/decidim/accountability/decidim_accountability.svg similarity index 100% rename from decidim-accountability/app/packs/images/decidim/accountability/decidim_accountability_icon.svg rename to decidim-accountability/app/packs/images/decidim/accountability/decidim_accountability.svg diff --git a/decidim-accountability/app/packs/stylesheets/decidim/accountability/accountability/_categories.scss b/decidim-accountability/app/packs/stylesheets/decidim/accountability/accountability/_categories.scss index 29d631348818f..31f8cdf95d036 100644 --- a/decidim-accountability/app/packs/stylesheets/decidim/accountability/accountability/_categories.scss +++ b/decidim-accountability/app/packs/stylesheets/decidim/accountability/accountability/_categories.scss @@ -1,7 +1,6 @@ .accountability{ .categories{ a:hover{ - background-color: var(--secondary); text-decoration: underline; } @@ -69,7 +68,7 @@ .card__link{ .category--line{ - background-color: var(--secondary); + background-color: $light-gray-dark; border-radius: 4px; min-height: 9rem; padding: 1rem; diff --git a/decidim-accountability/app/permissions/decidim/accountability/admin/permissions.rb b/decidim-accountability/app/permissions/decidim/accountability/admin/permissions.rb index f30b8aec5c497..d673e9f7d5f8e 100644 --- a/decidim-accountability/app/permissions/decidim/accountability/admin/permissions.rb +++ b/decidim-accountability/app/permissions/decidim/accountability/admin/permissions.rb @@ -30,9 +30,10 @@ def timeline_entry def can_perform_actions_on?(subject, resource) return unless permission_action.subject == subject + return false if can_create_grandchildren_results? case permission_action.action - when :create + when :create, :create_children true when :update, :destroy resource.present? @@ -40,6 +41,11 @@ def can_perform_actions_on?(subject, resource) false end end + + def can_create_grandchildren_results? + result&.parent&.present? && + permission_action.action == :create_children + end end end end diff --git a/decidim-accountability/app/views/decidim/accountability/admin/import_results/new.html.erb b/decidim-accountability/app/views/decidim/accountability/admin/import_results/new.html.erb index 314b389e4a0ee..236fdb601a440 100644 --- a/decidim-accountability/app/views/decidim/accountability/admin/import_results/new.html.erb +++ b/decidim-accountability/app/views/decidim/accountability/admin/import_results/new.html.erb @@ -7,6 +7,13 @@
<%= t(".info", + link_new_status: new_status_path, + link_new_result: new_result_path, + link_export_csv: link_to(t(".download_export"),exports_path(current_component, id: "results", format: "CSV"), method: :post) + ).try("html_safe") %>
+