💚 Fix CI

pull/1/head
Alexis Drai 2 years ago
parent 4a4b998634
commit 2e3de1b8f7

@ -7,15 +7,18 @@ trigger:
- push
steps:
- name: sonar-analyses
- name: sonar-analysis
image: hub.codefirst.iut.uca.fr/camille.petitalot/drone-sonarplugin-reactnative:latest
commands:
- cd Source
- npm install
- npm run test
- ls ./test/coverage
- sonar-scanner -Dsonar.projectKey=AD_multiplat -Dsonar.sources=. -Dsonar.host.url=$${PLUGIN_SONAR_HOST}
-Dsonar.login=$${PLUGIN_SONAR_TOKEN} -Dsonar.javascript.lcov.reportPaths=./test/coverage/lcov.info
- npm run test:coverage
- ls ./coverage
- sonar-scanner
-Dsonar.projectKey=AD_multiplat
-Dsonar.sources=.
-Dsonar.host.url=$${PLUGIN_SONAR_HOST}
-Dsonar.login=$${PLUGIN_SONAR_TOKEN}
-Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
-Dsonar.exclusions=**/lcov-report/**
settings:
sonar_host: https://codefirst.iut.uca.fr/sonar/

@ -1,2 +1,4 @@
[![Build Status](https://codefirst.iut.uca.fr/api/badges/alexis.drai/dice_app/status.svg)](https://codefirst.iut.uca.fr/alexis.drai/AD_multiplat)
# AD_multiplat

@ -0,0 +1,10 @@
import React from 'react';
import {render} from '@testing-library/react-native';
import Greeting from './Greeting';
describe('Greeting component', () => {
it('renders Hello, World! text', () => {
const {getByText} = render(<Greeting/>);
expect(getByText('Hello, World!')).toBeTruthy();
});
});

@ -0,0 +1,6 @@
import React from 'react';
import {Text} from 'react-native';
export default function Greeting() {
return (<Text>Hello, World!</Text>);
}

3167
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -6,10 +6,31 @@
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web"
"web": "expo start --web",
"test": "jest",
"test:coverage": "jest --coverage"
},
"jest": {
"preset": "jest-expo",
"verbose": true,
"transformIgnorePatterns": [
"node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg)"
],
"testMatch": [
"**/?(*.)+(spec|test).ts?(x)"
],
"testEnvironment": "node",
"testEnvironmentOptions": {
"browsers": [
"chrome",
"firefox",
"safari"
]
}
},
"dependencies": {
"@expo/webpack-config": "^18.0.1",
"@testing-library/react-native": "^12.1.2",
"@types/react": "~18.0.27",
"expo": "~48.0.15",
"expo-status-bar": "~1.4.4",
@ -20,7 +41,10 @@
"typescript": "^4.9.4"
},
"devDependencies": {
"@babel/core": "^7.20.0"
"@babel/core": "^7.20.0",
"@types/jest": "^29.5.1",
"jest": "^29.5.0",
"jest-expo": "^48.0.2"
},
"private": true
}

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save