aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/ci.rake9
-rw-r--r--lib/tasks/generate.rake9
-rw-r--r--lib/tasks/imports.rake6
3 files changed, 20 insertions, 4 deletions
diff --git a/lib/tasks/ci.rake b/lib/tasks/ci.rake
index 658e4e04e..90e47560e 100644
--- a/lib/tasks/ci.rake
+++ b/lib/tasks/ci.rake
@@ -3,7 +3,7 @@ namespace :ci do
task :setup do
cp "config/database/jenkins.yml", "config/database.yml"
sh "RAILS_ENV=test rake db:migrate"
- sh "npm install"
+ sh "npm --production --no-progress install"
end
def git_branch
@@ -27,11 +27,14 @@ namespace :ci do
sh "bundle exec bundle-audit check --update"
end
+ task :spec do
+ sh "bundle exec rspec --profile"
+ end
+
task :teaspoon do
sh "RAILS_ENV=test bundle exec rake teaspoon"
end
-
desc "Deploy after CI"
task :deploy do
sh "cap #{deploy_env} deploy:migrations"
@@ -44,4 +47,4 @@ namespace :ci do
end
desc "Run continuous integration tasks (spec, ...)"
-task :ci => ["ci:setup", "spec", "ci:teaspoon", "cucumber", "ci:check_security", "ci:deploy", "ci:clean"]
+task :ci => ["ci:setup", "ci:spec", "ci:teaspoon", "cucumber", "ci:check_security", "ci:deploy", "ci:clean"]
diff --git a/lib/tasks/generate.rake b/lib/tasks/generate.rake
index f02a75cc2..a9b1a3454 100644
--- a/lib/tasks/generate.rake
+++ b/lib/tasks/generate.rake
@@ -2,8 +2,15 @@ namespace :generate do
desc "Create model diagrams for Chouette"
task :model_diagram => :environment do
- sh "bundle exec rake erd only='Calendar,Referential,Chouette::Line,Chouette::Route,Chouette::JourneyPattern,Chouette::VehicleJourney,Chouette::VehicleJourneyAtStop,Chouette::TimeTable,Chouette::TimeTableDate,Chouette::TimeTablePeriod,Chouette::Footnote,Chouette::Network,Chouette::Company,Chouette::StopPoint,Chouette::StopArea' filename='offer_datas' title='Offer Datas'"
sh "bundle exec rake erd only='Organisation,Referential,User,Workbench' filename='organisation' title='Organisation'"
+ sh "bundle exec rake erd only='Calendar,Referential,Chouette::Line,Chouette::Route,Chouette::JourneyPattern,Chouette::VehicleJourney,Chouette::VehicleJourneyAtStop,Chouette::TimeTable,Chouette::TimeTableDate,Chouette::TimeTablePeriod,Chouette::Footnote,Chouette::Network,Chouette::Company,Chouette::StopPoint,Chouette::StopArea' filename='offer_datas' title='Offer Datas'"
+ sh "bundle exec rake erd only='Organisation,StopAreaReferential,StopAreaReferentialSync,StopAreaReferentialSyncMessage,StopAreaReferentialMembership,LineReferential,LineReferentialSync,LineReferentialSyncMessage,LineReferentialMembership' filename='referentiels_externes' title='Référentiels externes'"
+ sh "bundle exec rake erd only='NetexImport,Import,WorkbenchImport,ImportResource,ImportMessage' filename='import' title='Import'"
+ #sh "bundle exec rake erd only='' filename='validation' title='Validation'"
+ #sh "bundle exec rake erd only='VehicleJourney,VehicleJourneyExport' filename='export' title='Export'"
+ #sh "bundle exec rake erd only='' filename='intégration' title='Integration'"
+ #sh "bundle exec rake erd only='' filename='fusion' title='Fusion'"
+ #sh "bundle exec rake erd only='' filename='publication' title='Publication'"
end
end
diff --git a/lib/tasks/imports.rake b/lib/tasks/imports.rake
new file mode 100644
index 000000000..6bc84acc8
--- /dev/null
+++ b/lib/tasks/imports.rake
@@ -0,0 +1,6 @@
+namespace :import do
+ desc "Notify parent imports when children finish"
+ task notify_parent: :environment do
+ ParentImportNotifier.notify_when_finished
+ end
+end