Skip to content

Commit 76ef2da

Browse files
committed
Merge branch 'release/0.26-stable' of github.com:Platoniq/decidim into temp/0.26
2 parents 3f742cf + a94516d commit 76ef2da

File tree

2,139 files changed

+172329
-11198
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,139 files changed

+172329
-11198
lines changed

.decidim-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.25.2
1+
0.26.4
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: '[CI] Module rspec'
2+
description: 'Test module with rspec'
3+
inputs:
4+
name:
5+
description: 'Module Name'
6+
required: true
7+
github_token:
8+
description: 'Github token'
9+
required: true
10+
ruby-version:
11+
description: 'Ruby Version'
12+
default: "2.7.5"
13+
required: false
14+
node-version:
15+
description: 'Node version'
16+
default: '16.9.1'
17+
required: false
18+
19+
runs:
20+
using: "composite"
21+
steps:
22+
- uses: rokroskar/[email protected]
23+
if: "github.ref != 'refs/heads/develop'"
24+
env:
25+
GITHUB_TOKEN: " ${{ inputs.github_token }}"
26+
- uses: ruby/setup-ruby@v1
27+
with:
28+
ruby-version: ${{ inputs.ruby-version }}
29+
bundler-cache: true
30+
- uses: actions/setup-node@v1
31+
with:
32+
node-version: ${{ inputs.node-version }}
33+
- name: Get npm cache directory path
34+
id: npm-cache-dir-path
35+
run: echo "::set-output name=dir::$(npm get cache)-${{ inputs.name }}"
36+
shell: "bash"
37+
- uses: actions/cache@v2
38+
id: npm-cache
39+
with:
40+
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
41+
key: npm-${{ hashFiles('**/package-lock.json') }}
42+
restore-keys: |
43+
npm-
44+
- run: bundle exec rake test_app
45+
name: Create test app
46+
shell: "bash"
47+
- run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots
48+
name: Create the screenshots folder
49+
shell: "bash"
50+
- uses: nanasess/[email protected]
51+
- run: RAILS_ENV=test bundle exec rails assets:precompile
52+
name: Precompile assets
53+
working-directory: ./spec/decidim_dummy_app/
54+
shell: "bash"
55+
- run: bundle exec brakeman --rails6 --force-scan .
56+
name: Scanning Security issues on module
57+
working-directory: ${{ inputs.name }}
58+
shell: "bash"

.github/workflows/ci_accountability.yml

Lines changed: 11 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,14 @@ on:
2323

2424
env:
2525
CI: "true"
26-
SIMPLECOV: "true"
27-
RUBY_VERSION: 2.7.1
26+
RUBY_VERSION: 2.7.5
2827
NODE_VERSION: 16.9.1
2928
DECIDIM_MODULE: decidim-accountability
3029

3130
jobs:
3231
main:
3332
name: Tests
34-
runs-on: ubuntu-latest
33+
runs-on: ubuntu-20.04
3534
if: "!startsWith(github.head_ref, 'chore/l10n')"
3635
timeout-minutes: 60
3736
services:
@@ -45,47 +44,28 @@ jobs:
4544
--health-retries 5
4645
env:
4746
POSTGRES_PASSWORD: postgres
47+
validator:
48+
image: ghcr.io/validator/validator:latest
49+
ports: ["8888:8888"]
4850
env:
4951
DATABASE_USERNAME: postgres
5052
DATABASE_PASSWORD: postgres
5153
DATABASE_HOST: localhost
5254
RUBYOPT: '-W:no-deprecated'
55+
VALIDATOR_HTML_URI: http://localhost:8888/
5356
steps:
54-
- uses: rokroskar/[email protected]
55-
if: "github.ref != 'refs/heads/develop'"
56-
env:
57-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
5857
- uses: actions/[email protected]
5958
with:
6059
fetch-depth: 1
61-
- uses: ruby/setup-ruby@v1
62-
with:
63-
ruby-version: ${{ env.RUBY_VERSION }}
64-
bundler-cache: true
65-
- uses: actions/setup-node@v1
60+
- uses: ./.github/actions/module-rspec
6661
with:
67-
node-version: ${{ env.NODE_VERSION }}
68-
- name: Get npm cache directory path
69-
id: npm-cache-dir-path
70-
run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}"
71-
- uses: actions/cache@v2
72-
id: npm-cache
73-
with:
74-
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
75-
key: npm-${{ hashFiles('**/package-lock.json') }}
76-
restore-keys: |
77-
npm-
78-
- run: bundle exec rake test_app
79-
name: Create test app
80-
- run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots
81-
name: Create the screenshots folder
82-
- uses: nanasess/[email protected]
83-
- run: RAILS_ENV=test bundle exec rails assets:precompile
84-
name: Precompile assets
85-
working-directory: ./spec/decidim_dummy_app/
62+
github_token: ${{ secrets.GITHUB_TOKEN }}
63+
name: ${{ env.DECIDIM_MODULE }}
8664
- run: bundle exec rspec
8765
name: RSpec
8866
working-directory: ${{ env.DECIDIM_MODULE }}
67+
env:
68+
SIMPLECOV: "true"
8969
- run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH
9070
name: Upload coverage
9171
- uses: actions/upload-artifact@v2

.github/workflows/ci_admin.yml

Lines changed: 9 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "[CI] Admin"
1+
name: "[CI] Admin (unit tests)"
22
on:
33
push:
44
branches:
@@ -18,15 +18,14 @@ on:
1818

1919
env:
2020
CI: "true"
21-
SIMPLECOV: "true"
22-
RUBY_VERSION: 2.7.1
21+
RUBY_VERSION: 2.7.5
2322
NODE_VERSION: 16.9.1
2423
DECIDIM_MODULE: decidim-admin
2524

2625
jobs:
2726
main:
2827
name: Tests
29-
runs-on: ubuntu-latest
28+
runs-on: ubuntu-20.04
3029
if: "!startsWith(github.head_ref, 'chore/l10n')"
3130
timeout-minutes: 60
3231
services:
@@ -46,41 +45,18 @@ jobs:
4645
DATABASE_HOST: localhost
4746
RUBYOPT: '-W:no-deprecated'
4847
steps:
49-
- uses: rokroskar/[email protected]
50-
if: "github.ref != 'refs/heads/develop'"
51-
env:
52-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
5348
- uses: actions/[email protected]
5449
with:
5550
fetch-depth: 1
56-
- uses: ruby/setup-ruby@v1
57-
with:
58-
ruby-version: ${{ env.RUBY_VERSION }}
59-
bundler-cache: true
60-
- uses: actions/setup-node@v1
51+
- uses: ./.github/actions/module-rspec
6152
with:
62-
node-version: ${{ env.NODE_VERSION }}
63-
- name: Get npm cache directory path
64-
id: npm-cache-dir-path
65-
run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}"
66-
- uses: actions/cache@v2
67-
id: npm-cache
68-
with:
69-
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
70-
key: npm-${{ hashFiles('**/package-lock.json') }}
71-
restore-keys: |
72-
npm-
73-
- run: bundle exec rake test_app
74-
name: Create test app
75-
- run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots
76-
name: Create the screenshots folder
77-
- uses: nanasess/[email protected]
78-
- run: RAILS_ENV=test bundle exec rails assets:precompile
79-
name: Precompile assets
80-
working-directory: ./spec/decidim_dummy_app/
81-
- run: bundle exec rspec
53+
github_token: ${{ secrets.GITHUB_TOKEN }}
54+
name: ${{ env.DECIDIM_MODULE }}
55+
- run: bundle exec rspec --exclude-pattern 'spec/system/**/*_spec.rb'
8256
name: RSpec
8357
working-directory: ${{ env.DECIDIM_MODULE }}
58+
env:
59+
SIMPLECOV: "true"
8460
- run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH
8561
name: Upload coverage
8662
- uses: actions/upload-artifact@v2
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: "[CI] Admin (system tests 1)"
2+
on:
3+
push:
4+
branches:
5+
- develop
6+
- release/*
7+
- "*-stable"
8+
pull_request:
9+
branches-ignore:
10+
- "chore/l10n*"
11+
paths:
12+
- "*"
13+
- ".github/**"
14+
- "decidim-admin/**"
15+
- "decidim-core/**"
16+
- "decidim-dev/**"
17+
- "decidim-participatory_processes/**"
18+
19+
env:
20+
CI: "true"
21+
RUBY_VERSION: 2.7.5
22+
NODE_VERSION: 16.9.1
23+
DECIDIM_MODULE: decidim-admin
24+
25+
jobs:
26+
main:
27+
name: Tests
28+
runs-on: ubuntu-20.04
29+
if: "!startsWith(github.head_ref, 'chore/l10n')"
30+
timeout-minutes: 60
31+
services:
32+
postgres:
33+
image: postgres:11
34+
ports: ["5432:5432"]
35+
options: >-
36+
--health-cmd pg_isready
37+
--health-interval 10s
38+
--health-timeout 5s
39+
--health-retries 5
40+
env:
41+
POSTGRES_PASSWORD: postgres
42+
validator:
43+
image: ghcr.io/validator/validator:latest
44+
ports: ["8888:8888"]
45+
env:
46+
DATABASE_USERNAME: postgres
47+
DATABASE_PASSWORD: postgres
48+
DATABASE_HOST: localhost
49+
RUBYOPT: '-W:no-deprecated'
50+
VALIDATOR_HTML_URI: http://localhost:8888/
51+
steps:
52+
- uses: actions/[email protected]
53+
with:
54+
fetch-depth: 1
55+
- uses: ./.github/actions/module-rspec
56+
with:
57+
github_token: ${{ secrets.GITHUB_TOKEN }}
58+
name: ${{ env.DECIDIM_MODULE }}
59+
- run: |
60+
count=$(ls spec/system/*_spec.rb | wc -l | tr -d ' ')
61+
half=$(expr $count / 2)
62+
list_of_files=$(ls spec/system/*_spec.rb | sed -n "1,$(echo $half)p" | xargs)
63+
bundle exec rspec $list_of_files
64+
name: RSpec
65+
working-directory: ${{ env.DECIDIM_MODULE }}
66+
env:
67+
SIMPLECOV: "true"
68+
- run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH
69+
name: Upload coverage
70+
- uses: actions/upload-artifact@v2
71+
if: always()
72+
with:
73+
name: screenshots
74+
path: ./spec/decidim_dummy_app/tmp/screenshots
75+
if-no-files-found: ignore
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: "[CI] Admin (system tests 2)"
2+
on:
3+
push:
4+
branches:
5+
- develop
6+
- release/*
7+
- "*-stable"
8+
pull_request:
9+
branches-ignore:
10+
- "chore/l10n*"
11+
paths:
12+
- "*"
13+
- ".github/**"
14+
- "decidim-admin/**"
15+
- "decidim-core/**"
16+
- "decidim-dev/**"
17+
- "decidim-participatory_processes/**"
18+
19+
env:
20+
CI: "true"
21+
RUBY_VERSION: 2.7.5
22+
NODE_VERSION: 16.9.1
23+
DECIDIM_MODULE: decidim-admin
24+
25+
jobs:
26+
main:
27+
name: Tests
28+
runs-on: ubuntu-20.04
29+
if: "!startsWith(github.head_ref, 'chore/l10n')"
30+
timeout-minutes: 60
31+
services:
32+
postgres:
33+
image: postgres:11
34+
ports: ["5432:5432"]
35+
options: >-
36+
--health-cmd pg_isready
37+
--health-interval 10s
38+
--health-timeout 5s
39+
--health-retries 5
40+
env:
41+
POSTGRES_PASSWORD: postgres
42+
env:
43+
DATABASE_USERNAME: postgres
44+
DATABASE_PASSWORD: postgres
45+
DATABASE_HOST: localhost
46+
RUBYOPT: '-W:no-deprecated'
47+
steps:
48+
- uses: actions/[email protected]
49+
with:
50+
fetch-depth: 1
51+
- uses: ./.github/actions/module-rspec
52+
with:
53+
github_token: ${{ secrets.GITHUB_TOKEN }}
54+
name: ${{ env.DECIDIM_MODULE }}
55+
- run: |
56+
count=$(ls spec/system/*_spec.rb | wc -l | tr -d ' ')
57+
half=$(expr $count / 2)
58+
list_of_files=$(ls spec/system/*_spec.rb | sed -n "$(expr $half + 1), $(echo $count)p" | xargs)
59+
bundle exec rspec $list_of_files
60+
name: RSpec
61+
working-directory: ${{ env.DECIDIM_MODULE }}
62+
env:
63+
SIMPLECOV: "true"
64+
- run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH
65+
name: Upload coverage
66+
- uses: actions/upload-artifact@v2
67+
if: always()
68+
with:
69+
name: screenshots
70+
path: ./spec/decidim_dummy_app/tmp/screenshots
71+
if-no-files-found: ignore

0 commit comments

Comments
 (0)