diff options
| author | Alex <git@ajschof.me> | 2025-02-17 16:57:12 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-17 16:57:12 +0000 |
| commit | 33ed56b24e8855d4233537b399d139c1fed74b3e (patch) | |
| tree | 8b2565a9973f3452bfbcb6b2703a3597a3b41f87 /.github/workflows/main.yml | |
| parent | 219ab7976938f5e6a2804e2096480bb242647b00 (diff) | |
| download | gdpr-obfuscator-33ed56b24e8855d4233537b399d139c1fed74b3e.tar.gz gdpr-obfuscator-33ed56b24e8855d4233537b399d139c1fed74b3e.zip | |
Create main.yml
Diffstat (limited to '.github/workflows/main.yml')
| -rw-r--r-- | .github/workflows/main.yml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..c1a5e19 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,40 @@ +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.11' # Adjust to your desired Python version + + - 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 |
