Skip to content

Merge pull request #37 from mpenning/develop #105

Merge pull request #37 from mpenning/develop

Merge pull request #37 from mpenning/develop #105

Workflow file for this run

---
name: 'SonarCloud'
on:
push:
branches:
- 'main'
pull_request:
types:
- 'opened'
- 'synchronize'
- 'reopened'
jobs:
sonarqube:
name: 'SonarQube'
runs-on: 'ubuntu-latest'
steps:
- uses: 'actions/checkout@v5'
with:
fetch-depth: 0
- name: 'Setup Python'
uses: 'actions/setup-python@v5'
with:
python-version: '3.12'
- name: 'Install ciscoconfparse2'
run: 'pip install .'
- name: 'Install coverage'
run: 'pip install coverage==5.0.0'
- name: 'Install pytest'
run: 'pip install pytest'
- name: 'Run coverage'
run: 'cd tests && coverage run -m pytest'
- name: 'Generate xml'
run: 'cd tests && coverage xml -o coverage.xml'
- name: 'Relocate the coverage report'
run: 'mv tests/coverage.xml coverage.xml'
- name: 'SonarQube Scan'
uses: 'SonarSource/sonarqube-scan-action@master'
env:
SONAR_TOKEN: '${{ secrets.SONAR_TOKEN }}'
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'