Create demo_file.py #193
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
run-tests: | |
runs-on: [ubuntu-latest] | |
env: | |
DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN_PROD }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Set up python3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Run tests | |
run: | | |
pip install pytest-cov django | |
pytest --cov=./ --cov-report=xml | |
- name: Report test coverage to DeepSource (prod) | |
run: | | |
curl https://deepsource.io/cli | sh | |
./bin/deepsource report --analyzer test-coverage --key python --value-file ./coverage.xml | |