diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2ea013b..dd6fa2b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -34,3 +34,20 @@ jobs: node-version: ${{ matrix.node-version }} - run: npm install - run: npm run lint + + sonarcloud: + name: SonarCloud + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Install dependencies + run: yarn + - name: Test and coverage + run: npm run test:coverage + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 76add87..5a19e8a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules -dist \ No newline at end of file +dist +coverage \ No newline at end of file diff --git a/package.json b/package.json index 727b2f6..33a5972 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "dev": "tsc --watch", "test": "jest", "test:dev": "jest --watch", + "test:coverage": "jest --coverage", "lint": "eslint .", "prepare": "husky install" },