name: Test and Report Coverage on: pull_request: branches: - stable jobs: test: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} - name: Set up Python uses: actions/setup-python@v4 with: python-version: '3.13' - name: Install dependencies run: | python -m pip install --upgrade pip pip install poetry poetry install - name: Run tests with pytest-cov run: | poetry run pytest --cov=./ --cov-report=xml:coverage.xml - name: Report results to DeepSource env: DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }} run: | # Install DeepSource CLI curl https://deepsource.io/cli | sh # Report coverage results (ensure the path to coverage.xml is correct) ./bin/deepsource report --analyzer test-coverage --key python --value-file ./coverage.xml