Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add nightly CRON job for Tiobe TICS. #172

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

aznashwan
Copy link

Overview

This patch adds:

  • the necessary tox env targets for generating Cobertura coverage report XML format
  • a GitHub Workflow which runs the unit tests with coverage enabled, and calls the TICSServer to upload the analysis results

Rationale

Workflow will allow for daily automatic code quality report uploads to Tiobe after the project is onboarded on their end and we receive our TICSAUTHTOKEN for the workflow.

Juju Events Changes

None.

Module Changes

None.

Library Changes

None.

Checklist

This patch adds:
- the necessary tox env targets for generating Cobertura
  coverage report XML format
- a GitHub Workflow which runs the unit tests with coverage enabled,
  and calls the `TICSServer` to upload the analysis results

Signed-off-by: Nashwan Azhari <[email protected]>
@aznashwan aznashwan requested a review from a team as a code owner November 19, 2024 13:10
# NOTE(aznashwan): TiCS install script doesn't define defaults; cannot '-u'
set -ex -o pipefail

export TICSAUTHTOKEN=${{ secrets.TICSAUTHTOKEN }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aznashwan who should provide this TICSAUTHTOKEN?

Copy link
Contributor

Test coverage for 7cf86f3

coverage-report: install_deps /home/runner/work/k8s-operator/k8s-operator/charms/worker/k8s> python -I -m pip install 'coverage[toml]'
coverage-report: commands[0] /home/runner/work/k8s-operator/k8s-operator/charms/worker/k8s> coverage report
Name                                    Stmts   Miss  Cover
-----------------------------------------------------------
lib/charms/k8s/v0/k8sd_api_manager.py     270     29    89%
src/charm.py                              466    238    49%
src/cloud_integration.py                   80      3    96%
src/containerd.py                         140     16    89%
src/cos_integration.py                     33     12    64%
src/events/update_status.py                48     10    79%
src/inspector.py                           40      4    90%
src/kube_control.py                        39     31    21%
src/literals.py                             1      0   100%
src/protocols.py                           16      3    81%
src/reschedule.py                          77      4    95%
src/snap.py                               165     10    94%
src/token_distributor.py                  181    109    40%
src/upgrade.py                             31      1    97%
-----------------------------------------------------------
TOTAL                                    1587    470    70%
coverage-report: OK (1.20=setup[1.00]+cmd[0.20] seconds)
congratulations :) (1.25 seconds)

Static code analysis report

Run started:2024-11-22 23:38:19.423841

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 3431
  Total lines skipped (#nosec): 3
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants