47 lines
1.4 KiB
YAML
Raw Normal View History

2022-07-10 14:57:40 +01:00
name: CI
on:
2022-08-13 22:37:53 +01:00
push:
branches: [ main ]
2022-07-10 14:57:40 +01:00
pull_request:
2022-08-13 22:37:53 +01:00
types: [opened, synchronize, reopened]
2022-07-10 14:57:40 +01:00
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:
2022-07-10 17:30:41 +01:00
fetch-depth: 0
2022-07-10 14:57:40 +01:00
- 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 .
2022-07-10 14:57:40 +01:00
- name: Run test suite
run: |
coverage run -m py.test -v --junitxml=testresults.xml
2022-07-10 14:57:40 +01:00
coverage xml
2022-08-13 22:37:53 +01:00
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
2022-08-13 22:37:53 +01:00
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 }}