pypilot/.github/workflows/pull-request.yml

40 lines
1.1 KiB
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 }}
fetch-depth: 0
- 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 --output-format=parseable --output=lintreport.txt .
- name: Run test suite
run: |
coverage run -m py.test -v --junitxml=testresults.xml
coverage xml
- uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
- uses: sonarsource/sonarqube-quality-gate-action@master
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}