From 13df6a5f4ede8ca2aa152c486b8b1723cda01439 Mon Sep 17 00:00:00 2001 From: Daniel Perrefort Date: Sun, 8 Feb 2026 09:51:28 -0500 Subject: [PATCH 1/3] Adds sonarqube to CI workflows --- .github/workflows/QA.yml | 17 +++++++++-------- sonar-project.properties | 2 ++ 2 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 sonar-project.properties diff --git a/.github/workflows/QA.yml b/.github/workflows/QA.yml index d324aff..f86a460 100644 --- a/.github/workflows/QA.yml +++ b/.github/workflows/QA.yml @@ -26,23 +26,24 @@ jobs: with: category: /language:python - codacy: - name: Codacy + sonarqube: + name: SonarQube runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v6 - - - name: Run Codacy Analysis CLI - uses: codacy/codacy-analysis-cli-action@master with: - project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} - upload: true + fetch-depth: 0 + + - name: SonarQube Scan + uses: SonarSource/sonarqube-scan-action@v6 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} report-qa-status: name: Report QA Status runs-on: ubuntu-latest - needs: [ codeql, codacy ] + needs: [ codeql, sonarqube ] if: always() steps: diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..c37021e --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,2 @@ +sonar.projectKey=Better-HPC_keystone-python-client +sonar.organization=better-hpc From 3b1fda0fcfe7f50d91322c71eb7aafa1e36f1442 Mon Sep 17 00:00:00 2001 From: Daniel Perrefort Date: Sun, 8 Feb 2026 11:18:09 -0500 Subject: [PATCH 2/3] Disables function tests --- .github/workflows/Test.yml | 70 +++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index 960c595..8a39edc 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -4,40 +4,40 @@ on: workflow_call: jobs: - function-tests: - name: Function Tests - runs-on: ubuntu-latest - - services: - api: - image: docker.cloudsmith.io/better-hpc/keystone/keystone-api - ports: - - 8000:8000 - - strategy: - fail-fast: false - matrix: - python-version: ${{ fromJson(vars.PYTHON_VERSIONS) }} - - steps: - - name: Checkout repository - uses: actions/checkout@v6 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v6 - with: - python-version: ${{ matrix.python-version }} - - - name: Install Poetry - uses: snok/install-poetry@v1 - with: - virtualenvs-create: false - - - name: Install dependencies - run: poetry install --with tests - - - name: Run tests - run: poetry run python -m unittest discover -s tests/function_tests + # function-tests: + # name: Function Tests + # runs-on: ubuntu-latest + # + # services: + # api: + # image: docker.cloudsmith.io/better-hpc/keystone/keystone-api + # ports: + # - 8000:8000 + # + # strategy: + # fail-fast: false + # matrix: + # python-version: ${{ fromJson(vars.PYTHON_VERSIONS) }} + # + # steps: + # - name: Checkout repository + # uses: actions/checkout@v6 + # + # - name: Set up Python ${{ matrix.python-version }} + # uses: actions/setup-python@v6 + # with: + # python-version: ${{ matrix.python-version }} + # + # - name: Install Poetry + # uses: snok/install-poetry@v1 + # with: + # virtualenvs-create: false + # + # - name: Install dependencies + # run: poetry install --with tests + # + # - name: Run tests + # run: poetry run python -m unittest discover -s tests/function_tests unit-tests: name: Unit Tests @@ -81,7 +81,7 @@ jobs: report-test-status: name: Report Test Status runs-on: ubuntu-latest - needs: [ unit-tests, function-tests ] + needs: [ unit-tests ] if: always() steps: From e824acc52f32712f58c8880331737e9427b7e0b3 Mon Sep 17 00:00:00 2001 From: Daniel Perrefort Date: Sun, 8 Feb 2026 11:23:32 -0500 Subject: [PATCH 3/3] Disables coverage reporting --- .github/workflows/Test.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index 8a39edc..30938eb 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -71,13 +71,6 @@ jobs: poetry run coverage report --omit="tests/*" poetry run coverage xml --omit="tests/*" -o coverage.xml - - name: Report partial coverage results - if: github.event_name != 'release' - shell: bash - run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report --partial -l Python -r coverage.xml - env: - CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} - report-test-status: name: Report Test Status runs-on: ubuntu-latest @@ -85,12 +78,6 @@ jobs: if: always() steps: - - name: Finish reporting coverage - shell: bash - run: bash <(curl -Ls https://coverage.codacy.com/get.sh) final - env: - CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} - - name: Check test status if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled') }} run: exit 1