Merge pull request #45 from turniere/ticket/TURNIERE-218

Add sonarqube & Code Climate Code analysis
This commit is contained in:
Daniel Schädler 2019-05-26 19:28:24 +02:00 committed by GitHub
commit 3ed8165501
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 8 deletions

View File

@ -9,3 +9,4 @@ tmp/**
.travis-yml
docker-compose.yml
README.md
sonar-project.properties

View File

@ -1,7 +1,11 @@
language: ruby
addons:
sonarcloud:
organization: turniere-dhbw
env:
- RAILS_ENV=test
script:
- sonar-scanner
- bundle exec rails db:migrate
- bundle exec rails spec
notifications:

View File

@ -1,23 +1,23 @@
# turniere-backend
[![Build Status](https://travis-ci.org/turniere/turniere-backend.svg?branch=master)](https://travis-ci.org/turniere/turniere-backend) [![pipeline status](https://gitlab.com/turniere/turniere-backend/badges/master/pipeline.svg)](https://gitlab.com/turniere/turniere-backend/commits/master) [![Coverage Status](https://coveralls.io/repos/gitlab/turniere/turniere-backend/badge.svg?branch=master)](https://coveralls.io/gitlab/turniere/turniere-backend?branch=master) [![](https://img.shields.io/badge/Protected_by-Hound-a873d1.svg)](https://houndci.com) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/c273578244de4830b30f9f61ba35247a)](https://app.codacy.com/app/Malaber/turniere-backend)
[![Build Status](https://travis-ci.org/turniere/turniere-backend.svg?branch=master)](https://travis-ci.org/turniere/turniere-backend) [![pipeline status](https://gitlab.com/turniere/turniere-backend/badges/master/pipeline.svg)](https://gitlab.com/turniere/turniere-backend/commits/master) [![Coverage Status](https://coveralls.io/repos/gitlab/turniere/turniere-backend/badge.svg?branch=master)](https://coveralls.io/gitlab/turniere/turniere-backend?branch=master) [![](https://img.shields.io/badge/Protected_by-Hound-a873d1.svg)](https://houndci.com) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/c273578244de4830b30f9f61ba35247a)](https://app.codacy.com/app/Malaber/turniere-backend) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=turniere_turniere-backend&metric=alert_status)](https://sonarcloud.io/dashboard?id=turniere_turniere-backend) [![Maintainability](https://api.codeclimate.com/v1/badges/9416f031ab812a59a3cd/maintainability)](https://codeclimate.com/github/turniere/turniere-backend/maintainability)
Ruby on Rails application serving as backend for turnie.re
# Installation
```
## Installation
```bash
# install dependencies
$ bundle install
# run migrations
$ rails db:migrate
```
# Running
## Running
Development (without mail confirmation and separate database):
```
```bash
$ RAILS_ENV=development rails server
```
# Generate diagrams
```
rails diagram:all_with_engines
## Generate diagrams
```bash
$ rails diagram:all_with_engines
```

View File

@ -1,6 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>Mail from turnie.re</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
/* Email styles need to be inline */

6
sonar-project.properties Normal file
View File

@ -0,0 +1,6 @@
sonar.projectKey=turniere_turniere-backend
sonar.organization=turniere-dhbw
sonar.projectName=turniere-backend
sonar.projectVersion=1.0
sonar.sources=app
sonar.ruby.coverage.reportPaths=coverage/.resultset.json