From df8fade89d2a16e92a157b1aa3d049ff4ec7676e Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Tue, 27 Oct 2020 13:55:31 +1300 Subject: [PATCH] Only run travis on deploy --- .travis.yml | 32 -------------------------------- script/deploy-tasks.sh | 3 ++- 2 files changed, 2 insertions(+), 33 deletions(-) diff --git a/.travis.yml b/.travis.yml index ba7ddb1ca..dc4ecc69a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,6 @@ sudo: required language: ruby dist: bionic -services: - - postgresql - - xvfb branches: only: - mainline @@ -13,37 +10,9 @@ cache: yarn: true directories: - tmp/cache/assets/test/sprockets -addons: - postgresql: "9.4" # Matches production - code_climate: - repo_token: - secure: "PfhLGBKRgNqhKuYCJsK+VPhdAzcgWFGeeOyxC/eS8gtlvIISVdgyZE+r30uIei0DFI6zEiN62eW4d+xtT4j7/e2ZcAcx7U52mza/SnQNuu3nCGQDJB8VOvV5NbnwXfi8vfr4e889Mt7k3ocd2c4gqB4UtRqrzhygj7HN+B/GfEk=" env: global: - secure: "Z5TpM2jEX4UCvNePnk/LwltQX48U2u9BRc+Iypr1x9QW2o228QJhPIOH39a8RMUrepGnkQIq9q3ZRUn98RfrJz1yThtlNFL3NmzdQ57gKgjGwfpa0e4Dwj/ZJqV2D84tDGjvdVYLP7zzaYZxQcwk/cgNpzKf/jq97HLNP7CYuf4=" - - ELASTIC_SEARCH_VERSION="7.5.1-amd64" - - COVERAGE=true - - GROWSTUFF_EMAIL="noreply@test.growstuff.org"g - - GROWSTUFF_SITE_NAME="Growstuff (travis)" - - RAILS_SECRET_TOKEN='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'] - - RAILS_ENV=test -before_install: - - sudo apt clean - - sudo apt update - - sudo apt install dpkg - - ./script/install_elasticsearch.sh - - sudo apt install google-chrome-stable - - ./script/install_linters.sh - - ./script/check_elasticsearch.sh -script: - - bundle exec rails db:create db:migrate - - bundle exec rails assets:precompile - - bundle exec rails search:reindex - - bundle exec rspec spec -fd -after_script: - - > - gem install codeclimate-test-reporter - codeclimate-test-reporter before_deploy: - bundle exec script/heroku_maintenance.rb on deploy: @@ -56,7 +25,6 @@ deploy: dev: growstuff-staging mainline: growstuff-prod run: - - "rake db:migrate" - "script/deploy-tasks.sh" - restart after_deploy: diff --git a/script/deploy-tasks.sh b/script/deploy-tasks.sh index 481f221f6..153b4a8b5 100755 --- a/script/deploy-tasks.sh +++ b/script/deploy-tasks.sh @@ -3,7 +3,8 @@ # tasks to run at deploy time, usually after 'rake db:migrate' # Permanent tasks -rake assets:precompile +rails db:migrate +rails assets:precompile # When adding tasks, do so in chronological order, and note the date # when it was added. This will help us know which ones have been run