docbrown/.travis.yml
Vaidehi Joshi 3f6600541e
✂️ Remove the approvals gem ✂️ (#12978)
* Remove approvals fixtures

* Remove approvals initializer

* Remove approvals gem

* Remove approvals step from travis.yml

* Remove approvals from dockerignore and gitignore

* Remove references to approvals gem in docs

* Un-approvals spec/liquid_tags/codepen_tag_spec.rb

* Un-approvals spec/liquid_tags/dotnet_fiddle_tag_spec.rb

* Temporarily skip other approvals tests

We will still need to delete files in /spec/fixtures/approvals after this.

* Revert changes to dotnet_fiddle_tag_spec and codepen_tag_spec, skip those tests instead

* Temporarily skip more approvals based tests

* Attempt at moving html doc inline

* Comment out one more approvals spec

* Update dotnet fiddle and codepen liquid tag specs to not use Approvals

* Update liquid tag specs + system specs to not use Approvals

* Un-approval feed import, github issue, and tweet tag specs

* Re-add .approvals to gitignore and dockerignore

* Use Rspec compound expectations
2021-03-19 13:28:06 -07:00

117 lines
4.1 KiB
YAML

branches:
only:
- master
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.
- ELASTICSEARCH_URL="http://localhost:9200"
before_install:
- gem install bundler:"<2.3"
install:
- date --rfc-3339=seconds
- nvm install
- pkill -9 -f elasticsearch || true
- curl -s -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.5.2-amd64.deb
- sudo dpkg -i --force-confnew elasticsearch-7.5.2-amd64.deb
- sudo sed -i.old 's/-Xms1g/-Xms128m/' /etc/elasticsearch/jvm.options
- sudo sed -i.old 's/-Xmx1g/-Xmx128m/' /etc/elasticsearch/jvm.options
- echo -e '-XX:+DisableExplicitGC\n-Djdk.io.permissionsUseCanonicalPath=true\n-Dlog4j.skipJansi=true\n-server\n' | sudo tee -a /etc/elasticsearch/jvm.options
- sudo chown -R elasticsearch:elasticsearch /etc/default/elasticsearch
- sudo systemctl start elasticsearch
- 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 = master
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 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:
master: 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:
master: benhalpern-community