| 1 |
name: SonarBuild |
| 2 |
on: |
| 3 |
push: |
| 4 |
branches: |
| 5 |
- develop |
| 6 |
pull_request: |
| 7 |
types: [opened, synchronize, reopened] |
| 8 |
jobs: |
| 9 |
sonarcloud: |
| 10 |
name: SonarCloud |
| 11 |
runs-on: ubuntu-latest |
| 12 |
steps: |
| 13 |
- uses: actions/checkout@v5 |
| 14 |
with: |
| 15 |
fetch-depth: 0 |
| 16 |
- name: Set up Python 3.13 |
| 17 |
uses: actions/setup-python@v6 |
| 18 |
with: |
| 19 |
python-version: 3.13 |
| 20 |
- name: Install dependencies |
| 21 |
run: | |
| 22 |
python -m pip install --upgrade pip wheel |
| 23 |
pip install -e ".[tests, lxml]" |
| 24 |
- name: Test with pytest |
| 25 |
run: | |
| 26 |
pytest tests --cov=fastkml --cov=tests --cov-report=xml |
| 27 |
|
| 28 |
- name: SonarCloud Scan |
| 29 |
uses: SonarSource/sonarcloud-github-action@master |
| 30 |
env: |
| 31 |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 32 |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |