Commit a573bd2e authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

Merge branch 'feat/sonar-analysis' into 'dev'

fix: sonar conf

See merge request web-et-numerique/llle_project/ecolyo!601
parents a9638ce3 126eb10a
......@@ -123,13 +123,14 @@ sonarqube:
stage: quality
only:
- dev
when: manual
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/skilldlabs/sonar-scanner:4.0.0
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/sonarsource/sonar-scanner-cli:4
variables:
GIT_STRATEGY: clone
GIT_DEPTH: 0
before_script:
- npm install --save sonar-scanner
SONAR_USER_HOME: '${CI_PROJECT_DIR}/.sonar' # Defines the location of the analysis task cache
GIT_DEPTH: '0' # T
cache:
key: '${CI_JOB_NAME}'
paths:
- .sonar/cache
script:
- >
sonar-scanner
......@@ -147,13 +148,14 @@ sonarqube-mr:
stage: quality
only:
- merge_requests
when: manual
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/skilldlabs/sonar-scanner:4.0.0
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/sonarsource/sonar-scanner-cli:4
variables:
GIT_STRATEGY: clone
GIT_DEPTH: 0
before_script:
- npm install --save sonar-scanner
SONAR_USER_HOME: '${CI_PROJECT_DIR}/.sonar' # Defines the location of the analysis task cache
GIT_DEPTH: '0' # T
cache:
key: '${CI_JOB_NAME}'
paths:
- .sonar/cache
script:
- >
sonar-scanner
......
......@@ -10,8 +10,6 @@
.ecogesture-form-single {
width: 100%;
max-width: 53rem;
color: #ffffff;
margin: 1rem 1rem 3.5rem;
color: $white;
margin: 1rem 1rem 3.5rem;
@media (min-width: $width-tablet) {
......
......@@ -143,7 +143,6 @@
.fpi-content-perf-no-data {
color: $grey-bright;
& span {
display: inline-block;
padding-right: 0.25rem;
font-size: 1.1rem;
display: block;
......
import { Migration } from './migration.type'
import { Client } from 'cozy-client'
import {
PROFILE_DOCTYPE,
PROFILETYPE_DOCTYPE,
USERCHALLENGE_DOCTYPE,
EGL_DAY_DOCTYPE,
EGL_MONTH_DOCTYPE,
EGL_YEAR_DOCTYPE,
FLUIDPRICES_DOCTYPE,
ENEDIS_DAY_DOCTYPE,
GRDF_DAY_DOCTYPE,
ENEDIS_MONTHLY_ANALYSIS_DATA_DOCTYPE,
ENEDIS_MONTH_DOCTYPE,
ENEDIS_YEAR_DOCTYPE,
FLUIDPRICES_DOCTYPE,
GRDF_DAY_DOCTYPE,
GRDF_MONTH_DOCTYPE,
GRDF_YEAR_DOCTYPE,
ENEDIS_MONTHLY_ANALYSIS_DATA_DOCTYPE,
PROFILETYPE_DOCTYPE,
PROFILE_DOCTYPE,
USERCHALLENGE_DOCTYPE,
} from 'doctypes'
import { DataloadEntity, Profile, ProfileType, UserChallenge } from 'models'
import { Client } from 'cozy-client'
import { DateTime } from 'luxon'
import { UserQuizState } from 'enum/userQuiz.enum'
import { DateTime } from 'luxon'
import { DataloadEntity, Profile, ProfileType, UserChallenge } from 'models'
import { Migration } from './migration.type'
export const SCHEMA_INITIAL_VERSION = 0
......@@ -503,7 +503,7 @@ export const migrations: Migration[] = [
releaseNotes: null,
docTypes: ENEDIS_MONTHLY_ANALYSIS_DATA_DOCTYPE,
run: async (_client: Client, docs: any[]): Promise<any> => {
docs.map(doc => {
return docs.map(doc => {
if (doc.minLoad) {
const numberofDaysInMonth = DateTime.fromObject({
month: doc.month,
......@@ -512,8 +512,8 @@ export const migrations: Migration[] = [
doc.minimumLoad = doc.minLoad * 48 * numberofDaysInMonth
delete doc.minLoad
}
return doc
})
return docs
},
},
{
......@@ -525,11 +525,10 @@ export const migrations: Migration[] = [
releaseNotes: null,
docTypes: FLUIDPRICES_DOCTYPE,
run: async (_client: Client, docs: any[]): Promise<any> => {
docs.map(doc => {
return docs.map(doc => {
doc.deleteAction = true
return doc
})
return docs
},
},
]
import { Client, Q, QueryDefinition } from 'cozy-client'
import challengeEntityData from 'db/challengeEntity.json'
import duelEntityData from 'db/duelEntity.json'
import ecogestureData from 'db/ecogestureData.json'
import explorationEntityData from 'db/explorationEntity.json'
import profileData from 'db/profileData.json'
import quizEntityData from 'db/quizEntity.json'
import {
CHALLENGE_DOCTYPE,
DUEL_DOCTYPE,
ECOGESTURE_DOCTYPE,
PROFILE_DOCTYPE,
EGL_DAY_DOCTYPE,
EGL_MONTH_DOCTYPE,
EGL_YEAR_DOCTYPE,
......@@ -9,16 +16,16 @@ import {
ENEDIS_MINUTE_DOCTYPE,
ENEDIS_MONTH_DOCTYPE,
ENEDIS_YEAR_DOCTYPE,
EXPLORATION_DOCTYPE,
GRDF_DAY_DOCTYPE,
GRDF_MONTH_DOCTYPE,
GRDF_YEAR_DOCTYPE,
CHALLENGE_DOCTYPE,
DUEL_DOCTYPE,
PROFILE_DOCTYPE,
QUIZ_DOCTYPE,
EXPLORATION_DOCTYPE,
} from 'doctypes'
import { FluidType } from 'enum/fluid.enum'
import { TimeStep } from 'enum/timeStep.enum'
import { DateTime } from 'luxon'
import {
Dataload,
FluidPrice,
......@@ -28,38 +35,27 @@ import {
TermsStatus,
UserChallenge,
} from 'models'
import EcogestureService from 'services/ecogesture.service'
import ChallengeService from 'services/challenge.service'
import ecogestureData from 'db/ecogestureData.json'
import challengeEntityData from 'db/challengeEntity.json'
import duelEntityData from 'db/duelEntity.json'
import quizEntityData from 'db/quizEntity.json'
import explorationEntityData from 'db/explorationEntity.json'
import ProfileService from 'services/profile.service'
import profileData from 'db/profileData.json'
import KonnectorStatusService from 'services/konnectorStatus.service'
import KonnectorService from 'services/konnector.service'
import { InitSteps, InitStepsErrors } from 'models/initialisationSteps.model'
import { ProfileEcogesture } from 'models/profileEcogesture.model'
import React from 'react'
import AccountService from 'services/account.service'
import FluidService from 'services/fluid.service'
import ChallengeService from 'services/challenge.service'
import DuelService from 'services/duel.service'
import QuizService from 'services/quiz.service'
import EcogestureService from 'services/ecogesture.service'
import ExplorationService from 'services/exploration.service'
import { hashFile } from 'utils/hash'
import FluidService from 'services/fluid.service'
import KonnectorService from 'services/konnector.service'
import KonnectorStatusService from 'services/konnectorStatus.service'
import ProfileService from 'services/profile.service'
import QuizService from 'services/quiz.service'
import { getActualAnalysisDate } from 'utils/date'
import { TimeStep } from 'enum/timeStep.enum'
import { DateTime } from 'luxon'
import ProfileTypeEntityService from './profileTypeEntity.service'
import TermsService from './terms.service'
import { hashFile } from 'utils/hash'
import log from 'utils/logger'
import { ProfileEcogesture } from 'models/profileEcogesture.model'
import ProfileEcogestureService from './profileEcogesture.service'
import FluidPricesService from './fluidsPrices.service'
import EnvironmentService from './environment.service'
import React from 'react'
import { InitSteps, InitStepsErrors } from 'models/initialisationSteps.model'
import FluidPricesService from './fluidsPrices.service'
import ProfileEcogestureService from './profileEcogesture.service'
import ProfileTypeEntityService from './profileTypeEntity.service'
import TermsService from './terms.service'
export default class InitializationService {
private readonly _client: Client
......@@ -270,7 +266,6 @@ export default class InitializationService {
if (hash !== hashEcogestureType) {
// Update the doctype
try {
loadedEcogestures
// Deletion of all documents
await ecogestureService.deleteAllEcogestures()
// Population with the data
......
......@@ -16,7 +16,7 @@ const mockClient = ({
version: '0.0.0',
},
options: {
uri: 'http://cozy.tools:8080',
uri: 'http://cozy.tools:8080', // NOSONAR
},
} as unknown) as jest.Mocked<Client>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment