47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
name: CI
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
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:
|
|
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
|
|
- name: SonarCloud Scan
|
|
uses: SonarSource/sonarcloud-github-action@master
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
|
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_CLOUD }}
|
|
# - 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 }}
|