Skip to content

Commit

Permalink
Merge branch 'release/0.26-stable' of github.com:Platoniq/decidim int…
Browse files Browse the repository at this point in the history
…o temp/0.26
  • Loading branch information
fblupi committed Feb 2, 2023
2 parents 3f742cf + a94516d commit 76ef2da
Show file tree
Hide file tree
Showing 2,139 changed files with 172,329 additions and 11,198 deletions.
2 changes: 1 addition & 1 deletion .decidim-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.25.2
0.26.4
58 changes: 58 additions & 0 deletions .github/actions/module-rspec/action.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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/[email protected]
- 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"
42 changes: 11 additions & 31 deletions .github/workflows/ci_accountability.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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/[email protected]
if: "github.ref != 'refs/heads/develop'"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/[email protected]
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/[email protected]
- 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
Expand Down
42 changes: 9 additions & 33 deletions .github/workflows/ci_admin.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "[CI] Admin"
name: "[CI] Admin (unit tests)"
on:
push:
branches:
Expand All @@ -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:
Expand All @@ -46,41 +45,18 @@ jobs:
DATABASE_HOST: localhost
RUBYOPT: '-W:no-deprecated'
steps:
- uses: rokroskar/[email protected]
if: "github.ref != 'refs/heads/develop'"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/[email protected]
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/[email protected]
- 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
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/ci_admin_system_1.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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
71 changes: 71 additions & 0 deletions .github/workflows/ci_admin_system_2.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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
Loading

0 comments on commit 76ef2da

Please sign in to comment.