From 48c9735110d685885f3858f5e32775e4ee60eebf Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Mon, 6 Nov 2023 13:46:01 -0600 Subject: [PATCH] CI: rake geoportal:ci GH Actions was calling rake ci, which was returning GBL Admin's rake ci task; This change nests our local CI task under geoportal:ci to make sure "our" ci task is the one running. --- .github/workflows/ci.yml | 2 +- lib/tasks/geoportal.rake | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a5aa28e66..e856a1d9c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,7 +75,7 @@ jobs: ENGINE_CART_RAILS_OPTIONS: '--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-test' SOLR_URL: http://solr:SolrRocks@localhost:8983/solr/blacklight-core FARADAY_VERSION: ${{ matrix.faraday_version }} - run: bundle exec rake ci --trace + run: bundle exec rake geoportal:ci --trace - name: Artifacts - Upload coverage uses: actions/upload-artifact@v2 diff --git a/lib/tasks/geoportal.rake b/lib/tasks/geoportal.rake index 03a9484d9..399cf6e3d 100644 --- a/lib/tasks/geoportal.rake +++ b/lib/tasks/geoportal.rake @@ -1,15 +1,14 @@ # frozen_string_literal: true - -task :ci do - if Rails.env.test? - success = true - Rake::Task['geoportal:index:seed'].invoke - system('RAILS_ENV=test bundle exec rails test:system test') || success = false - exit!(1) unless success +namespace :geoportal do + task :ci do + if Rails.env.test? + success = true + Rake::Task['geoportal:index:seed'].invoke + system('RAILS_ENV=test bundle exec rails test:system test') || success = false + exit!(1) unless success + end end -end -namespace :geoportal do desc 'Run Solr and GeoBlacklight for interactive development' task :server, [:rails_server_args] do require 'solr_wrapper'