This repository has been archived by the owner on Jun 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
68 lines (58 loc) · 2.88 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
language: minimal
git:
depth: false
cache:
directories:
- "$HOME/bundle"
- "$HOME/.bundle_config"
- "$HOME/node_modules"
- "$HOME/coverage"
install:
- docker-compose build test
- docker-compose run test bin/plugdo bundle install -j4 --path /app/vendor/bundle --without development
- docker-compose run test yarn install
- docker-compose run test bin/rails db:create db:structure:load
before_script:
- openssl aes-256-cbc -K $encrypted_3f8c4ca1dcec_key -iv $encrypted_3f8c4ca1dcec_iv -in config/deploy_key.enc -out config/deploy_key -d
- chmod 600 config/deploy_key
- eval "$(ssh-agent -s)" && ssh-add config/deploy_key
- echo -e "Host app.omu.sh\n\tStrictHostKeyChecking no\n" >>~/.ssh/config
jobs:
include:
- stage: test
# first job at this stage
name: "Static analysis checks"
before_script: skip
script: docker-compose run test bundle exec rails zeitwerk:check static_analysis:all
# second job at this stage
- name: "Security and Database Tests"
before_script: skip
script: docker-compose run test bundle exec rails db:index
# third job at this stage
- name: "Integration Tests"
before_script: skip
script: docker-compose run test bundle exec rails test:system test && bash <(curl -Ls https://coverage.codacy.com/get.sh) report -l Ruby -r $HOME/coverage/coverage.xml
- stage: deploy
# first job at this stage
name: "Deploy to dokku#beta"
if: branch = develop AND type = push AND fork = false
cache: skip
install: skip
script: git remote add beta [email protected]:nokul-develop && git push --no-verify beta develop:master
- stage: deploy
# first job at this stage
name: "Deploy to dokku#production"
if: branch = master AND type = push AND fork = false
cache: skip
install: skip
script: git remote add production [email protected]:nokul && git push --no-verify production master
notifications:
email: false
slack:
on_success: change
on_failure: change
rooms:
- secure: ljbXmcdLA/wv+j3+RCE0qF/mZd/3PbHI0VOSBkeyJDXWcHHMduIyZlodzliuXL/8mfLbmcJ8MZT5tV9l0OGSgiFI/Ngz1fadsf+0Pim4MtREkp4yKRzfDbQqj8iQwzAAcIAxbIQhenVZtaadwBAM8Jawcjs0m2+iWXaiREU1IlRaK1NzGtkDx8gy5PnVgJhtWmhV7/l6a0Sg94shr53bchkuGwH/ugqgq9L+ec1gGKVpSOHhS0W5WjojMU+3K5/HCP/r9V2J2jYUjtzDSbEDFd18rH0qJjNq1hoaVeaW1uJzidSH7f7B6xXxJfUt4e2CiY+2CkR5LUbFx5V+6fNscEAA9u+zGh6Rn9rxciWkFfzKck6Eomoq5G+d+q/ItVagAMSIUELYCOup2+H/KtRNFTBWBqwECsvXZn7WwaZOdMXDfiTnI9eSWxJqaiwFMtC1A+bnKM7DX2qoZoGCNJAzzQ93EuXdxA1w1oYVs7lfh70qLx5OraXtcTUtfrv4tzms35S9JNNnEQyWN7neuPCS0Yh4QIFf4NX7aaYbwFD66uS25Iq2ochJ4oicFd8s+DxnaXc925GYXFVHk7wZWK/mFlGnZTuTbk4ElByqzRUN2sI5r7xYijv9cBcUM/1RqzXI3B/91Ft/kyCaYDrg3W1j79zLo+G5uIHU2/F1AQBIYlI=
template:
- "Build <%{build_url}|#%{build_number}> (<%{compare_url}|%{commit}>) of %{repository_slug}@%{branch}"
- "by %{author} %{result} in %{elapsed_time}"