Skip to content

refactor: adjust code paths #12

refactor: adjust code paths

refactor: adjust code paths #12

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@v2
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v2
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 }}