-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
47 lines (47 loc) · 2.34 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
language: ruby
rvm:
- 3.2.2
services:
- postgresql
addons:
postgresql: "14"
dist: jammy
cache:
- bundler
env:
matrix:
- API_ROOT='https://ccs.api/'
global:
- CF_ORG=ccs-report-management-info
- secure: "XuxCtcAuJjEP+SEzl5zJq/g9urjNFkcN4dAv35E8A/SV+rpjwza7rBv5CKO3TwrEoCe1Osn7ILfsqwPGv6riqDMeO0MLIrmxhniXOFHIO+0xg2loBefc/jiRCZufPwLNtgZW+BhgN701NOpsDZL3zcS2QT/Oy5w16/fob4dS9eCxX77FBeT8ig6IYuqkbs2UhCAUbHWrjZ3L3FJpXSHe+GB0pU+Qj61aNjZG21mTgaIG3G+O4ZOz+skBuJbqY+3JzGrzgI8ZxlzQXijAU2+TmkZHwu0uruKyN/19aEVBaEeAeJDc5mj9mpijCGi34ZM50Lr4ECmuX3JozfkvHYOkSsYxUXG/5HK1Y8mIOXDdkoyjn+R7cWPnbLykg6imaE3MosTUJ0PR1GbPblZPOZtGKPZ+XE6uTvrkTsjFFnfnSyPAbqPL8zcrgGa4ZP2FCXk45R0dJfBPu7Iik1SjDckt4n8p9B1YSPE6bFv2wnXCGWgjlo3iMwiLCK6M8eSf3Xrzstqb+DZiT91Y8kna71XhWfVR9muiO5mhRNj7xp8dSvOXqX9w2fI+SS+F3qZyqovRAZ2iozAaYMPIC0rQuwcKoyRdQ762Ixze6rvNG6i4Cyt/u4QTYRLDSPA5YjUdb5VA9PqF9b/Une70/vXKH7sooGQ9R0hKxG8R01XLqpN/R+M="
before_script:
- sudo apt-get -qq update
- sudo apt-get install -y postgresql-client
- psql -U postgres -c 'CREATE DATABASE DataSubmissionService_test;'
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
- bundle exec bin/rails db:migrate RAILS_ENV=test
- bundle exec rake AWS_ACCESS_KEY_ID=dummy AWS_SECRET_ACCESS_KEY=dummy AWS_S3_REGION=dummy AWS_S3_BUCKET=dummy SECRET_KEY_BASE=dummy DATABASE_URL=postgresql:does_not_exist --quiet assets:precompile
before_deploy:
- echo "install cloudfoundry cli"
- wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add -
- echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list
- sudo apt-key adv --keyserver hkps://keyserver.ubuntu.com --refresh-keys
- sudo apt-get update
- sudo apt-get install cf7-cli
deploy:
- provider: script
script: bash CF/deploy-app.sh -u $CF_USER -o $CF_ORG -p $CF_PASS -s staging
on:
branch: develop
- provider: script
script: bash CF/deploy-app.sh -u $CF_USER -o $CF_ORG -p $CF_PASS -s preprod
on:
branch: conclave
- provider: script
script: bash CF/deploy-app.sh -u $CF_USER -o $CF_ORG -p $CF_PASS -s prod
on:
branch: master
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT