Skip to content

Commit

Permalink
ci: Fix CI / CD (#1)
Browse files Browse the repository at this point in the history
* ci: Fix Job release

* fix: Add x86_64-linux support in Gemfile.lock

* chore: Update Gemspec documentation

* chore: Fix Rakefile to copy migrations

* lint: Fix rubocop offense
  • Loading branch information
Quentinchampenois authored May 2, 2024
1 parent 5102c2c commit a0fb5b9
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_emitter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
bundler-cache: true
- name: Run Rubocop
run: bundle exec rubocop -P
main:
tests:
name: Tests
runs-on: ubuntu-latest
timeout-minutes: 30
Expand Down
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,8 @@ GEM
nio4r (2.7.1)
nokogiri (1.16.4-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.4-x86_64-linux)
racc (~> 1.4)
oauth (1.1.0)
oauth-tty (~> 1.0, >= 1.0.1)
snaky_hash (~> 2.0)
Expand Down Expand Up @@ -801,6 +803,7 @@ GEM

PLATFORMS
arm64-darwin-22
x86_64-linux

DEPENDENCIES
bootsnap (~> 1.4)
Expand Down
37 changes: 34 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,39 @@

require "decidim/dev/common_rake"

def install_module(path)
Dir.chdir(path) do
system("bundle exec rake decidim_emitter:install:migrations")
system("bundle exec rake db:migrate")
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"
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 do
Bundler.with_original_env do
generate_decidim_app(
"development_app",
"--app_name",
"#{base_app_name}_development_app",
"--path",
"..",
"--recreate_db",
"--demo"
)
end

desc "Generates a development app."
task development_app: "decidim:generate_external_development_app"
install_module("development_app")
seed_db("development_app")
end
8 changes: 4 additions & 4 deletions decidim-emitter.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ Gem::Specification.new do |s|
s.license = "AGPL-3.0"
s.homepage = "https://decidim.org"
s.metadata = {
"bug_tracker_uri" => "https://github.com/decidim/decidim/issues",
"bug_tracker_uri" => "https://github.com/OpenSourcePolitics/decidim-module-emitter/issues",
"documentation_uri" => "https://docs.decidim.org/",
"funding_uri" => "https://opencollective.com/decidim",
"homepage_uri" => "https://decidim.org",
"source_code_uri" => "https://github.com/decidim/decidim",
"source_code_uri" => "https://github.com/OpenSourcePolitics/decidim-module-emitter",
"rubygems_mfa_required" => "true"
}
s.required_ruby_version = "~> 3.0"

s.name = "decidim-emitter"
s.summary = "A decidim emitter module"
s.description = "A Decidim module to create new emitters for administrators."
s.summary = "Decidim module for adding new emitters to participatory processes"
s.description = "A Decidim module for adding new emitters to participatory processes directly from the backoffice, and visible in the frontoffice."

s.files = Dir.chdir(__dir__) do
`git ls-files -z`.split("\x0").select do |f|
Expand Down

0 comments on commit a0fb5b9

Please sign in to comment.