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