diff --git a/.github/workflows/deep-source.yml b/.github/workflows/deep-source.yml new file mode 100644 index 0000000..03d6acc --- /dev/null +++ b/.github/workflows/deep-source.yml @@ -0,0 +1,44 @@ +name: Deep Source + +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + +permissions: + contents: read + checks: write + +jobs: + DeepSource: + name: Deep Source Coverage report + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Install DeepSource scanner + run: curl https://deepsource.io/cli | sh + + - name: Set up Node.js 22 + uses: actions/setup-node@v4 + with: + node-version: 22.x + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Test and coverage + run: npm run test:coverage + + - name: Build and analyze + env: + DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }} + run: ./bin/deepsource report --analyzer test-coverage --key javascript --value-file ./coverage/lcov.info