37 lines
1015 B
YAML
37 lines
1015 B
YAML
name: CI
|
|
on:
|
|
pull_request:
|
|
paths-ignore:
|
|
- 'README.md'
|
|
- 'LICENSE.md'
|
|
- '.gitignore'
|
|
- 'CODEOWNERS'
|
|
- 'renovate.json'
|
|
|
|
jobs:
|
|
ci:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.10"
|
|
- name: Install dependencies
|
|
run: pip install -r requirements.txt && pip install -r requirements-dev.txt
|
|
- name: Lint
|
|
run: pylint --recursive=yes .
|
|
- name: Run test suite
|
|
run: |
|
|
coverage run -m py.test -v
|
|
coverage xml
|
|
- name: Report results to DeepSource
|
|
run: |
|
|
curl https://deepsource.io/cli | sh
|
|
./bin/deepsource report --analyzer test-coverage --key python --value-file ./coverage.xml
|
|
env:
|
|
DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }}
|