-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
66 lines (66 loc) · 2.9 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
language: ruby
rvm:
- 3.2.2
services:
- postgresql
addons:
postgresql: "14"
apt:
update: true
packages:
- python3
- python3-pip
- python3-setuptools
- python3-wheel
dist: jammy
cache:
- bundler
- pip
env:
matrix:
- API_ROOT='https://ccs.api/'
global:
- CF_ORG=ccs-report-management-info
- secure: "N9v+XZcjaaF1nkd+/vim5P3ssK/l9pbQQ5ihliIIkMmXQlURP11xovXxAy0pkqFQC+Vi97f9nYTB+9rWg0KeoSaSpi7F0od8/UASSg9z7TkfxIY4MeqQgPGczwpuKmw3IF5/Qduw9bMFR3tqQsJAwN9rqpKIvo7/TS9sgiNLu9cV1WDDOYE0ItkgyjWkiGtXace98eUaRq3Zpu8i5a8FvpyP1wn2jZDD7ST9I5EFJUXS+18VGHFVdNoGWY3pfPm9+HCLyIkvKc3PMEAv6u95hBoLJVeuI29PH4Lv/q8PVSkNZ8L5whWXVVA9JIhOzBZwjBgd8s7GODAaPhDN6HTt7K1HtU04U6M1L+LvDCOZGM1eoIThgCUP60Y8h5aw6ECJENMrwt4WymJQ07svvGmg9vIuE8864hQC34+lpa0mDreEk2E5rJS/P2o/XlhwMIDvOySNGixd5hjydINxgFfP8/6yhaDJ8Q4lsbPuQsSU0HW8dXNiVRXCTBt2T31mUPNwEA/VeBHa5zMu8IEdV17s0GyNJIWtx0HebXPI7jVBDyhkuhsIlptAasWVHSOoA0YjNW/0aJa2HOW/ad1kOEs14RpbooM1UJsF8GQwMAdUe6nnt/FPen+ZErrFEaiMnpyLOyZnSn8FKBmTsVKz+Zoc+Su/fHEu5L0btVXUGeg/BbA="
before_install:
- gem install bundler -v 2.4.20
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- bundle config gems.contribsys.com $BUNDLE_GEMS__CONTRIBSYS__COM
install:
- bundle config set --local deployment 'true' without 'production' path 'vendor/bundle'
- bundle install --jobs=3 --retry=3
- pyenv install 3.8.12
- pyenv global 3.8.12
- pip3 install --upgrade "pip < 21.0"
- pip3 install --user --upgrade -r $PWD/requirements.txt
before_script:
- sudo apt-get -qq update
- sudo apt-get install -y postgresql-client
- psql -U postgres -c 'CREATE DATABASE DataSubmissionServiceApi_test;'
- ./cc-test-reporter before-build
- bundle exec 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
bundler_args: --without production
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 -qq
- 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