From d00cd8501f8c6b9680f49cd4474fe033753a1509 Mon Sep 17 00:00:00 2001 From: Guilherme Ribeiro Date: Fri, 12 May 2023 10:02:38 -0300 Subject: [PATCH] Sonarcloud - Unit test coverage (#2155) * feat: attempt to scan * feat: attempt with sonar file * fix: another attempt * fix: clean up * Update sonar-project.properties * fix: pulling history * tes * feat: testing file * Delete TestFile2.ts --- .github/workflows/unit-tests.yml | 16 +++++++++++++++- sonar-project.properties | 6 ++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 sonar-project.properties diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index f0f01525..6a210963 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -13,12 +13,26 @@ jobs: steps: - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + - run: yarn --frozen-lockfile + - run: yarn build + - run: yarn lint + - run: yarn type-check - - run: yarn test + + - run: yarn test:coverage + + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 00000000..f884d83d --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,6 @@ +sonar.host.url=https://sonarcloud.io +sonar.organization=adyen +sonar.projectKey=Adyen_adyen-web +sonar.sourceEncoding=UTF-8 + +sonar.javascript.lcov.reportPaths=./packages/lib/coverage/lcov.info