-
Notifications
You must be signed in to change notification settings - Fork 1k
test: add gh workflow for tiobe TICS static analysis reporting #6654
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a GitHub Actions workflow to automate weekly Tiobe TICS static analysis reporting, migrating this functionality from Jenkins to enable retirement of an internal Jenkins job.
Key changes:
- Introduces a new weekly scheduled workflow for TICS static analysis
- Configures the workflow to run on self-hosted runners with specific requirements
- Sets up dependency installation, coverage generation, and TICS analysis execution
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/weekly-tics.yml
Outdated
|
|
||
| - name: Coverage | ||
| run: | | ||
| make coverage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No such make target exists in this repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I hadn't committed changes for this stage to create TICS coverage artifacts. I've adapted them now from our server-jenkins/cloud-init/other job Link corrected for server-jenkins-job
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I hadn't committed changes for this stage to create TICS coverage artifacts. I've adapted them now from our server-jenkins/cloud-init/other job
wrong link?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link corrected for server-jenkins-job
holmanb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarifications @blackboxsw. I just added more feedback.
| - name: Generate TICS artifacts | ||
| run: | | ||
| mkdir .cover | ||
| python3 -m pytest --cov=cloudinit --cov-report=xml:.cover/coverage.xml || true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the wrong file name.
Why are we installing tox but not using it? I suspect we might not need wireguard or ubuntu-dev-tools either. I'd say that we should use just tox or just the read-dependencies script, but not both. And I lean towards tox's simplicity over depending on a home-grown script but I'll leave it up to you.
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: '17 5 * * 6' # Run at 5:17a (arbitrary) on Saturday |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In which timezone?
| # Best practices per https://library.canonical.com/corporate-policies/ | ||
| # information-security-policies/ssdlc/ssdlc---static-code-analysis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the doc applies to the whole file the top of the file seems like a more appropriate location.
Can we please not break the link?
Including "Best practices per" is unnecessary: it doesn't add value over just the link.
Process improvement moving some of our Tiobe TICS automation out of Jenkins and into GH actions.
Scheduling weekly reports from GH workflows will allow us to retire an internal cloud-init jenkins job.
Proposed Commit Message
Additional Context
Test Steps
Merge type