Skip to content

Commit

Permalink
Fix development_app generation
Browse files Browse the repository at this point in the history
  • Loading branch information
armandfardeau committed Jul 19, 2023
1 parent aeaa753 commit 51771e5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
RUBY_VERSION: 2.7.5

jobs:
lint-report:
lints:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2.0.0
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true
- name: Setup Test App
- name: Setup test_app
run: bundle exec rake test_app
- name: Rspec unit tests
run: bundle exec rspec --exclude-pattern "spec/system/**/*_spec.rb"
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true
- name: Setup Test App
- name: Setup test_app
run: bundle exec rake test_app
- name: Rspec system tests
run: bundle exec rspec --pattern "spec/system/**/*_spec.rb"
Expand Down
23 changes: 22 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,32 @@ def install_module(path)
end
end

def seed_db(path)
Dir.chdir(path) do
system("bundle exec rake db:seed")
end
end

desc "Generates a dummy app for testing"
task test_app: "decidim:generate_external_test_app" do
ENV["RAILS_ENV"] = "test"
install_module("spec/decidim_dummy_app")
end

desc "Generates a development app."
task development_app: "decidim:generate_external_development_app"
task :development_app do
Bundler.with_original_env do
generate_decidim_app(
"development_app",
"--app_name",
"#{base_app_name}_development_app",
"--path",
"..",
"--recreate_db",
"--demo"
)
end

install_module("development_app")
seed_db("development_app")
end

0 comments on commit 51771e5

Please sign in to comment.