Skip to content

Conversation

fdiblen
Copy link
Member

@fdiblen fdiblen commented Aug 21, 2024

Description

This PR makes sonarcloud optional.

Related issues:

Instructions to review the pull request

Install the requirements

cd $(mktemp -d --tmpdir py-tmpl-XXXXXX)
pip install pipx
pipx install copier

Test 1:

Step-1:
Run the command below and say 'yes' to sonarcloud question

copier copy --vcs-ref 460_sonarcloud https://github.com/nlesc/python-template test_yes

Step-2:
Run the command below and say 'no' to sonarcloud question

copier copy --vcs-ref 460_sonarcloud https://github.com/nlesc/python-template test_no

What to check:
You should see the files below only when you say 'yes':

  • .github/workflows/next_steps_sonarcloud.yml
  • .github/workflows/next_steps_sonarcloud_issue.md
  • .github/workflows/sonarcloud.yml
  • sonar-project.properties

Check if there are mentions of sonar, sonarcloud or analysis in any file of the generated package.

Test 2:

  • Push the generated package to a GitHub repository
  • Check if sonarcloud.yml workflow runs (probably it will fail)
  • Check if next_steps_sonarcloud.yml workflow runs
  • Check if next_steps_sonarcloud.yml workflow is removed after run
  • Check if a GitHub issue about sonar cloud is created

@fdiblen fdiblen marked this pull request as ready for review August 21, 2024 18:10
@lyashevska
Copy link
Collaborator

Clean up did not work for me, see here:
https://github.com/lyashevska/test-sonarcloud/actions/runs/10505693029/job/29104011849

Copy link
Collaborator

@lyashevska lyashevska left a comment

Choose a reason for hiding this comment

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

thanks @fdiblen. Can you please check sonar-project.properties.jinja and clean up of the documents.

@fdiblen fdiblen requested a review from lyashevska August 22, 2024 13:15
Copy link
Collaborator

@lyashevska lyashevska left a comment

Choose a reason for hiding this comment

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

Looking good @fdiblen. Thanks!

@fdiblen fdiblen merged commit 349ed1d into main Aug 22, 2024
15 checks passed
@fdiblen fdiblen deleted the 460_sonarcloud branch August 22, 2024 13:46
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