docbrown/.travis.yml
Alex 393ba00221
Remove Elasticsearch ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ (#13606)
* Attempt number 1

* Fix rack_attack specs

* Fix users_searches_users spec

* Fix display_users_search_spec

* Fix comment typo

* Remove search:destroy task from cypress

* Remove port 9300 from gitpod

* Stub response in attack_spec
2021-05-03 11:09:45 -04:00

109 lines
3.5 KiB
YAML

branches:
only:
- main
language: ruby
cache:
directories:
- vendor/bundle
- ~/.cache
rvm:
- 2.7.2
addons:
postgresql: '10' # Travis does not work out of the box with Postgres 11 yet
chrome: 'stable'
artifacts:
paths:
- $(ls tmp/screenshots/*.png | tr "\n" ":")
- $(ls tmp/csvs/*.csv | tr "\n" ":")
- $(ls cypress/screenshots/*.* | tr "\n" ":")
- $(ls cypress/videos/*.* | tr "\n" ":")
debug: true
services:
- redis
env:
global:
- RAILS_ENV=test
- DATABASE_URL=postgres://postgres@localhost/Forem_prod_test
- DATABASE_NAME=Forem_prod_test
- DATABASE_URL_TEST=postgres://postgres@localhost/Forem_test
- DATABASE_NAME_TEST=Forem_test
# Dummy values needed to verify the app boots via "rails runner"
- APP_PROTOCOL=http://
- APP_DOMAIN=localhost:3000
- HEROKU_APP_URL=practicaldev.herokuapp.com
- SECRET_KEY_BASE=dummydummydummy
- GITHUB_KEY=dummy
- GITHUB_SECRET=dummy
- KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true
- KNAPSACK_PRO_LOG_LEVEL=info
- KNAPSACK_PRO_CI_NODE_TOTAL=3
- COVERAGE_REPORTS_TOTAL=4
- FOREM_OWNER_SECRET="secret" # test secret so e2e tests can run properly.
before_install:
- gem install bundler:"<2.3"
install:
- date --rfc-3339=seconds
- nvm install
- bundle config set path 'vendor/bundle'
- cp .env_sample .env
- bin/ci-bundle
- yarn install --frozen-lockfile
script:
- bundle exec rails db:create db:schema:load webpacker:compile
- bin/knapsack_pro_rspec
notifications:
slack:
if: branch = main
on_pull_requests: false
on_success: change
on_failure: always
rooms:
secure: 0cTxjTqAFnfCR9jw7lZFcTrTcil8QKTX4h2dzKKCeWaWpsYcvJsvhREfsdIGwrdChmHHYCveHp84dP3ouMvcXoSYEzTASZpK+nVGw2+E4kh3EbzA49N00RoeM+gnbEla3MtCjVxH7KVznLyV/jVfFoCZR6xYnO+pknZzUZwJzyffnSmAlwsQkw1Dt1FAw/uodfGqiDJjUgZhtQ51KFg74HiBd80iUc8ieg6zAEV4QnlW3YvjrHSJC2+AFblXQ7RVkAok8w3G876yQOXvEfESCV+wlmoXbSlQm7V2awMmY5v23iKMvJRRn7JMxTGzG1x2NvNIFL8NZBM+CcjMJxkDSU7Rc/hxVAbuEEYQdd3VPKmYv3o5jcPYjQY08nbz4OREZtiXMsFVCOLuZaCba2c7Xelr7c0eFOdRpQScN2SQtI039Zw8jUQgni18kiWyD/1CfYFIGUvpTCy8rHN0RCJkb0+wOlo3UjEbVDqCi6x06yQ/367XHc27hzFpfDQprVccCMDHbE47kj2fUsBX+FaocpzwODBMLLXZf/v6Vg/bhVArxAl9GLmWNt8942YVgRzkboR3yAy1mA3wx/1frLURY1C5377dx7LXwhHp/4Od6ms1xTBSEcEIRWPy7wQ0yG8fe9VPNFc0ndCEPnqkF8NLTxOX9w3uQ3wDB78NEyEDni0=
jobs:
include:
- stage: Test
name: "Node 0"
env: KNAPSACK_PRO_CI_NODE_INDEX=0
- stage: Test
name: "Node 1"
env: KNAPSACK_PRO_CI_NODE_INDEX=1
- stage: Test
name: "Node 2"
env: KNAPSACK_PRO_CI_NODE_INDEX=2
- stage: Test
name: "Front-end tests, Storybook, bundle audit, console check, e2e"
script:
- yarn lint:frontend
- yarn test --colors
- bundle exec rails db:create db:schema:load assets:precompile
- bundle exec bundle-audit check --update
- bin/test-console-check
- yarn build-storybook
- bin/e2e-ci
- stage: Deploy
name: Deploy DEV
if: type != pull_request
install: skip
script: skip
after_script: skip
deploy:
provider: heroku
api_key: '$HEROKU_AUTH_TOKEN'
app:
main: practicaldev
after_deploy:
- bash scripts/after_deploy.sh
- stage: Deploy
name: Deploy BenHalpern
if: type != pull_request
install: skip
script: skip
after_script: skip
deploy:
provider: heroku
api_key: '$HEROKU_AUTH_TOKEN'
app:
main: benhalpern-community