-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.travis.yml
More file actions
46 lines (46 loc) · 1.53 KB
/
.travis.yml
File metadata and controls
46 lines (46 loc) · 1.53 KB
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
dist: jammy
language: ruby
rvm:
— 3.2.2
env:
matrix:
- API_ROOT=$deploy_api_uri
global:
- RAILS_ENV=test
- CF_USER=$deploy_username
- CF_ORG=$deploy_org_name
- CF_PASS=$deploy_password
- CC_TEST_REPORTER_ID=$CC_TEST_REPORTER_ID
- CF_SPACE=$SPACE
services:
- postgresql
addons:
postgresql: '14'
install: bundle install --jobs=3 --retry=3
before_script:
- sudo apt-get -qq update
- sudo apt-get install -y postgresql-client
- psql -U postgres -c 'create database cii_test'
# - psql -U postgres -d cii_test -c 'create extension postgis'
- 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
script:
- bundle exec rake db:setup
- bundle exec rake
- bundle exec rubocop
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-get -qq 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 $CF_SPACE
on:
all_branches: true
condition: $SPACE =~ ^(development|testing|integration|nft|uat|pre-production|sandbox|production)$
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT