forked from forem/forem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
128 lines (126 loc) · 4.02 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
dist: focal
branches:
only:
- main
language: ruby
cache:
bundler: true
directories:
- node_modules
rvm:
- 2.7.2
addons:
postgresql: '12'
apt:
packages:
- postgresql-12
- postgresql-client-12
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
env:
global:
- RAILS_ENV=test
- RUBY_THREAD_VM_STACK_SIZE=5242880
- DATABASE_URL=postgres://travis@localhost:5433/Forem_prod_test
- DATABASE_NAME=Forem_prod_test
- DATABASE_URL_TEST=postgres://travis@localhost:5433/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:
- >-
sudo sed -i
-e '/local.*peer/s/postgres/all/'
-e 's/peer\|md5/trust/g'
/etc/postgresql/12/main/pg_hba.conf
- sudo service postgresql@12-main restart
- 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"
script:
- yarn lint:frontend
- yarn test --colors
- bundle exec bundle-audit check --update
- bin/test-console-check
- yarn build-storybook
- stage: Test
name: "E2E Seeded"
script:
- bundle exec rails db:create db:schema:load assets:precompile
- yarn cypress install
- bin/e2e-ci
- stage: Test
name: "E2E Non-seeded"
script:
- bundle exec rails db:create db:schema:load assets:precompile
- yarn cypress install
- CREATOR_ONBOARDING_SEED_DATA=1 E2E_FOLDER=creatorOnboardingFlows 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