diff --git a/.github/workflows/merge-to-main.yml b/.github/workflows-disabled/merge-to-main.yml similarity index 100% rename from .github/workflows/merge-to-main.yml rename to .github/workflows-disabled/merge-to-main.yml diff --git a/.github/workflows/pull-request.yml b/.github/workflows/ci.yml similarity index 56% rename from .github/workflows/pull-request.yml rename to .github/workflows/ci.yml index d1081ac..57fc9cf 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,9 @@ name: CI on: + push: + branches: [ main ] pull_request: + types: [opened, synchronize, reopened] paths-ignore: - 'README.md' - 'LICENSE.md' @@ -29,11 +32,16 @@ jobs: run: | coverage run -m py.test -v --junitxml=testresults.xml coverage xml - - uses: sonarsource/sonarqube-scan-action@master + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-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 }} \ No newline at end of file + 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 }} diff --git a/.gitignore b/.gitignore index 7f4045e..93338ea 100644 --- a/.gitignore +++ b/.gitignore @@ -38,8 +38,8 @@ pip-log.txt pip-delete-this-directory.txt # Unit test / coverage reports -lintreport.txt -testresults.xml +# lintreport.txt +# testresults.xml htmlcov/ .tox/ .nox/ diff --git a/README.md b/README.md index 8160fcd..0251f08 100644 --- a/README.md +++ b/README.md @@ -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 Simple script to convert IPv4 addresses to 6to4 addresses. See RFC 3056 for details. diff --git a/sonar-project.properties b/sonar-project.properties index e0353f3..1948393 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,8 +1,12 @@ -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.coverage.reportPaths=coverage.xml sonar.python.pylint.reportPaths=lintreport.txt sonar.python.xunit.reportPath=testresults.xml sonar.sources=app sonar.tests=tests -sonar.exclusions=,.github/**,.gitignore,CODEOWNERS,CHANGELOG.md,LICENSE.md,README.md,renovate.json,requirements-dev.txt,requirements.txt \ No newline at end of file +sonar.exclusions=,.github/**,.gitignore,CODEOWNERS,CHANGELOG.md,LICENSE.md,README.md,renovate.json,requirements-dev.txt,requirements.txt