-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add yarn * Remove error log * Modify package.json * Add yarn install to start.sh * Add leaflet google * Remove leaflet-google from package json * remove passenger error logs * Fix install script * Remove flag * Fix gemfile * Fix conflicts * Fix gemfile.lock * Run asset-precompile on travis * Run create only for production * Change permissions of exporter script * Cherry pick local builds for travis runners, #672 Co-authored-by: Álax de Carvalho Alves <alaxallves@gmail.com> * Fix rubocop offence
- Loading branch information
1 parent
2aeee83
commit 5673c03
Showing
32 changed files
with
3,176 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,3 +44,5 @@ todo.txt | |
.byebug_history | ||
coverage_report/ | ||
test/reports/ | ||
yarn-error.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
require 'simplecov-cobertura' | ||
|
||
if ENV['CI'] == 'true' | ||
SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter | ||
else | ||
SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter | ||
end | ||
|
||
SimpleCov.start 'rails' do | ||
add_group 'Units', 'app/models' | ||
add_group 'Functionals', 'app/controllers' | ||
add_group 'Services', 'app/services' | ||
add_group 'Libraries', 'lib/' | ||
|
||
add_filter '/test/' | ||
add_filter '/config/' | ||
add_filter '/db/' | ||
add_filter '/vendor/' | ||
add_filter '/log/' | ||
add_filter '/tmp/' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,51 @@ | ||
sudo: required | ||
|
||
language: generic | ||
language: ruby | ||
rvm: | ||
- 2.4.6 | ||
|
||
services: | ||
- mysql | ||
- docker | ||
|
||
cache: | ||
bundler: true | ||
directories: | ||
- public/lib/ | ||
|
||
install: | ||
- cp config/database.yml.test.example config/database.yml | ||
- cp config/database.yml.example config/database.yml | ||
- cp config/config.yml.example config/config.yml | ||
- cp db/schema.rb.example db/schema.rb | ||
- docker-compose -f docker-compose.test.yml up -d --build | ||
- > | ||
while (! docker logs mapknitter-test | grep "Phusion Passenger Standalone web server started") > /dev/null 2>&1; do | ||
echo "Waiting for start script to finish..."; | ||
sleep 20; | ||
done; echo "Done!" | ||
- docker-compose -f docker-compose.test.yml exec web bash -lc "rake db:setup || rake db:migrate" | ||
- ./lib/exporter-deps.sh > /dev/null 2>&1 | ||
- bundle install && yarn install | ||
- bundle exec rake db:setup || bundle exec rake db:migrate | ||
|
||
env: | ||
global: | ||
- RAILS_ENV=test | ||
matrix: | ||
- TASK="CI=true TRAVIS=true rake test:unit" | ||
- TASK="CI=true TRAVIS=true rake test:integration" | ||
- TASK="CI=true TRAVIS=true rake test:functional" | ||
- TASK="CI=true TRAVIS=true rake assets:precompile" | ||
- CI=true | ||
- TRAVIS=true | ||
|
||
script: | ||
- docker-compose -f docker-compose.test.yml exec web bash -lc "$TASK" | ||
- bash <(curl -s https://codecov.io/bash) | ||
jobs: | ||
include: | ||
- name: "Unit Tests" | ||
script: bundle exec rake test:unit | ||
- name: "Integration Tests" | ||
script: bundle exec rake test:integration | ||
- name: "Functional Tests" | ||
script: bundle exec rake test:functional | ||
- name: "Rubocop Linter" | ||
script: bundle exec rubocop | ||
- name: "Docker Builds" | ||
script: docker build -t mapknitter . | ||
# Configure this option after full yarn setup | ||
# - name: "Asset Precompilation" | ||
# env: | ||
# - RAILS_ENV=production | ||
# script: bundle exec rake assets:precompile | ||
|
||
branches: | ||
only: | ||
- main | ||
- unstable | ||
- development | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--install.modules-folder "./public/lib" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.