Switch to SonarCloud #2

Merged
luketainton merged 1 commits from sonarcloud into main 2022-08-13 20:47:03 +00:00
5 changed files with 24 additions and 12 deletions

View File

@@ -1,6 +1,9 @@
name: CI name: CI
on: on:
push:
branches: [ main ]
pull_request: pull_request:
types: [opened, synchronize, reopened]
paths-ignore: paths-ignore:
- 'README.md' - 'README.md'
- 'LICENSE.md' - 'LICENSE.md'
@@ -29,11 +32,16 @@ jobs:
run: | run: |
coverage run -m py.test -v --junitxml=testresults.xml coverage run -m py.test -v --junitxml=testresults.xml
coverage xml coverage xml
- uses: sonarsource/sonarqube-scan-action@master - name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env: env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_CLOUD }}
- uses: sonarsource/sonarqube-quality-gate-action@master # - uses: sonarsource/sonarqube-scan-action@master
timeout-minutes: 5 # env:
env: # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
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 }}

4
.gitignore vendored
View File

@@ -38,8 +38,8 @@ pip-log.txt
pip-delete-this-directory.txt pip-delete-this-directory.txt
# Unit test / coverage reports # Unit test / coverage reports
lintreport.txt # lintreport.txt
testresults.xml # testresults.xml
htmlcov/ htmlcov/
.tox/ .tox/
.nox/ .nox/

View File

@@ -1,4 +1,4 @@
# 6to4_converter [![CI](https://github.com/luketainton/6to4_converter/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/luketainton/6to4_converter/actions/workflows/ci.yml) # 6to4_converter [![CI](https://github.com/luketainton/6to4_converter/actions/workflows/merge-to-main.yml/badge.svg?branch=main)](https://github.com/luketainton/6to4_converter/actions/workflows/merge-to-main.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=luketainton_6to4_converter&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=luketainton_6to4_converter)
## Description ## Description
Simple script to convert IPv4 addresses to 6to4 addresses. See RFC 3056 for details. Simple script to convert IPv4 addresses to 6to4 addresses. See RFC 3056 for details.

View File

@@ -1,4 +1,8 @@
sonar.projectKey=luketainton_6to4_converter_AYHpASgJSbMjdyWLhHiC sonar.organization=luketainton
# sonar.projectKey=luketainton_6to4_converter_AYHpASgJSbMjdyWLhHiC
sonar.projectKey=luketainton_6to4_converter
sonar.projectName=6to4_converter
sonar.projectVersion=1.0
sonar.python.version=3.10 sonar.python.version=3.10
sonar.python.coverage.reportPaths=coverage.xml sonar.python.coverage.reportPaths=coverage.xml
sonar.python.pylint.reportPaths=lintreport.txt sonar.python.pylint.reportPaths=lintreport.txt