Version bump #302
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: linting-test-coverage | |
on: [pull_request_target] | |
env: | |
PYTHON_VER: "3.10" | |
DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }} | |
jobs: | |
linting: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the commit | |
uses: actions/checkout@v1 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install Python ${{ env.PYTHON_VER }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ env.PYTHON_VER }} | |
- name: Install black | |
run: | | |
python -m pip install --upgrade pip | |
pip install black | |
- name: Python linting | |
run: | | |
black . | |
unit-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the commit | |
uses: actions/checkout@v1 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install Python ${{ env.PYTHON_VER }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ env.PYTHON_VER }} | |
- name: Install dependancies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Python unit tests | |
run: | | |
coverage run -m unittest | |
coverage xml | |
- name: Test coverage to deepsource.io | |
run: | | |
curl https://deepsource.io/cli | sh | |
./bin/deepsource report --analyzer test-coverage --key python --value-file ./coverage.xml |