diff --git a/.github/workflows/sonar-scan.yml b/.github/workflows/sonar-scan.yml new file mode 100644 index 00000000..a6880744 --- /dev/null +++ b/.github/workflows/sonar-scan.yml @@ -0,0 +1,22 @@ +name: Sonar Scan + +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize, reopened] + +jobs: + sonarcloud: + name: SonarCloud + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/example/e2e/detoxTest.spec.js b/example/e2e/detoxTest.spec.js index feb78dd2..55a7f7f1 100644 --- a/example/e2e/detoxTest.spec.js +++ b/example/e2e/detoxTest.spec.js @@ -250,7 +250,6 @@ describe('e2e tests', () => { it(':android: when component unmounts, dialog is dismissed', async () => { await elementById('showAndDismissPickerButton').tap(); - await wait(1000); await expect(getDatePickerAndroid()).toExist(); await wait(6000); diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 00000000..b38e4d53 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,4 @@ +sonar.organization=react-native-datetimepicker +sonar.projectKey=react-native-datetimepicker_datetimepicker +sonar.sources=src +sonar.sourceEncoding=UTF-8