Skip to content

BUILD-8099 build Poetry action#4

Merged
julien-carsique-sonarsource merged 3 commits intomasterfrom
feat/jcarsique/BUILD-8337-buildPoetry
Jul 2, 2025
Merged

BUILD-8099 build Poetry action#4
julien-carsique-sonarsource merged 3 commits intomasterfrom
feat/jcarsique/BUILD-8337-buildPoetry

Conversation

@julien-carsique-sonarsource
Copy link
Copy Markdown
Contributor

@julien-carsique-sonarsource julien-carsique-sonarsource commented Jun 25, 2025

  • BUILD-8099 build poetry action
    • implement as a build action the Poetry build (regular_poetry_build_publish) from ci-common-scripts; see https://github.com/SonarSource/ci-common-scripts/pull/71
    • no need to restrict mise cache thanks to .github/workflows/pr-cleanup.yml
    • add ShellSpec tests
    • use mise.local.toml per action to not conflict with the caller mise.toml definition
  • Build number cleanup
    • remove unused input run-id
    • add .sh file extension to the Shell script
  • BUILD-8291 fix PR cleanup test
    • no execution on PR close for .github/workflows/test-pr-cleanup.yml
    • use actions/cache/save in .github/workflows/test-pr-cleanup.yml, no need for restore included in actions/cache
  • BUILD-8099 100% shellspec coverage, including for pr_cleanup action
    • extract embedded Go templates to files, for readability and to circumvent a kcov issue (this was considered as uncovered code)
    • ShellSpec for the three actions, targeting 100% code coverage without testing unlikely corner and exotic cases
    • Run SonarCloud Code Analysis after unit tests
  • Documentation
    • Fix Markdown lint to allow "Multiple headings with the same content" in different siblings
    • add CONTRIBUTE.md (inspired from ci-common-scripts) to describe action development and testing
  • mise: add ShellSpec and JFrog CLI

Leftover draft code, comments and not implemented features (following PRs):

  • improve setup of kcov, if possible (Debian package download and install at the moment)
  • improve setup and usage of sonar-scanner-cli (ZIP package download and install at the moment)
  • public build should use sonarsource-pypi-public (not available at the moment), instead of sonarsource-pypi
  • set_build_env() function is very similar to source github-env <BUILD|BUILD-PRIVATE> used for Maven build: is there a path to factorization?
  • as discussed, get-build-number is not called by the build-poetry action, it is expected to be provided by the caller. See https://github.com/SonarSource/sonar-dummy-python-oss/pull/38/files#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721R29-R30 ; the alternative is kept in comments until we figure out what it the best user experience
  • promotion

Tested with

@julien-carsique-sonarsource julien-carsique-sonarsource force-pushed the feat/jcarsique/BUILD-8337-buildPoetry branch 26 times, most recently from bf1d88a to a6e5981 Compare June 27, 2025 15:25
@sonarqubecloud
Copy link
Copy Markdown

Please retry analysis of this Pull-Request directly on SonarQube Cloud

@julien-carsique-sonarsource julien-carsique-sonarsource force-pushed the feat/jcarsique/BUILD-8337-buildPoetry branch 3 times, most recently from 5211d19 to 3eddfb3 Compare June 30, 2025 15:46
@julien-carsique-sonarsource julien-carsique-sonarsource force-pushed the feat/jcarsique/BUILD-8337-buildPoetry branch 6 times, most recently from a03ab07 to 7737f97 Compare July 1, 2025 09:16
@julien-carsique-sonarsource julien-carsique-sonarsource changed the title BUILD-8337 build Poetry action BUILD-8099 build Poetry action Jul 1, 2025
@julien-carsique-sonarsource julien-carsique-sonarsource marked this pull request as ready for review July 1, 2025 10:25
@julien-carsique-sonarsource julien-carsique-sonarsource requested a review from a team July 1, 2025 10:25
Comment thread .github/workflows/test-shell-scripts.yml
Comment thread build-poetry/build.sh Outdated
Comment thread build-poetry/action.yml
Copy link
Copy Markdown
Contributor

@matemoln matemoln left a comment

Choose a reason for hiding this comment

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

Could you remove the ### Environment Variables section from the README?

@julien-carsique-sonarsource julien-carsique-sonarsource force-pushed the feat/jcarsique/BUILD-8337-buildPoetry branch 3 times, most recently from b6c9d4d to 5d25a0b Compare July 1, 2025 16:41
Comment thread pr_cleanup/cleanup.sh Outdated
@julien-carsique-sonarsource julien-carsique-sonarsource marked this pull request as draft July 2, 2025 07:19
@julien-carsique-sonarsource julien-carsique-sonarsource force-pushed the feat/jcarsique/BUILD-8337-buildPoetry branch 2 times, most recently from 9203a3b to d1d56b3 Compare July 2, 2025 08:07
@julien-carsique-sonarsource julien-carsique-sonarsource force-pushed the feat/jcarsique/BUILD-8337-buildPoetry branch from d1d56b3 to 2fa8e53 Compare July 2, 2025 08:16
@julien-carsique-sonarsource julien-carsique-sonarsource marked this pull request as ready for review July 2, 2025 08:16
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jul 2, 2025

@julien-carsique-sonarsource julien-carsique-sonarsource merged commit 31f8b52 into master Jul 2, 2025
10 checks passed
@julien-carsique-sonarsource julien-carsique-sonarsource deleted the feat/jcarsique/BUILD-8337-buildPoetry branch July 2, 2025 08:43
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