style: format code with Black and ISort #186
Workflow file for this run
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_DEV: ${{ secrets.DEEPSOURCE_DSN_DEV }} | |
DEEPSOURCE_DSN_ENTERPRISE_DEV: ${{ secrets.DEEPSOURCE_DSN_ENTERPRISE_DEV }} | |
DEEPSOURCE_DSN_PROD: ${{ 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 dev (python, go, js, php) | |
run: | | |
curl https://deepsource.io/cli | sh | |
export DEEPSOURCE_DSN=$DEEPSOURCE_DSN_DEV | |
./bin/deepsource report --analyzer test-coverage --key python --value-file ./coverage.xml | |
./bin/deepsource report --analyzer test-coverage --key go --value-file ./go_coverage.out | |
./bin/deepsource report --analyzer test-coverage --key javascript --value-file ./js_coverage.xml | |
./bin/deepsource report --analyzer test-coverage --key php --value-file ./php_coverage.xml | |
- name: Report test coverage to DeepSource dev enterprise (python) | |
run: | | |
curl https://deepsource.io/cli | sh | |
export DEEPSOURCE_DSN=$DEEPSOURCE_DSN_ENTERPRISE_DEV | |
./bin/deepsource report --analyzer test-coverage --key python --value-file ./coverage.xml | |
- name: Report test coverage to DeepSource prod (python, go, js, php) | |
run: | | |
curl https://deepsource.io/cli | sh | |
export DEEPSOURCE_DSN=$DEEPSOURCE_DSN_PROD | |
./bin/deepsource report --analyzer test-coverage --key python --value-file ./coverage.xml | |
./bin/deepsource report --analyzer test-coverage --key go --value-file ./go_coverage.out | |
./bin/deepsource report --analyzer test-coverage --key javascript --value-file ./js_coverage.xml | |
./bin/deepsource report --analyzer test-coverage --key php --value-file ./php_coverage.xml | |