-
Notifications
You must be signed in to change notification settings - Fork 724
Remove autoscan ITs and add withoutSemantic tests #5870
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
Open
romainbrenguier
wants to merge
10
commits into
master
Choose a base branch
from
romain/remove-autoscan
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
5071e2f
Remove autoscan integration test module
romainbrenguier 5b0dc96
WIP: Add withoutSemantic() tests to check test files
romainbrenguier df9336b
Fix withoutSemantic() tests and add verifyAnalysisSucceeds()
romainbrenguier 3fadb66
Fix code review issues: conflict marker, dead code, and semantic test…
romainbrenguier 8ff3a82
Add tests for verifyAnalysisSucceeds() in InternalCheckVerifier and J…
romainbrenguier 18d36ba
Migrate withoutSemantic tests from verifyAnalysisSucceeds to verifyIs…
romainbrenguier ba463bf
Fix compilation errors in WithoutSemantic test sample files
romainbrenguier 2e7a6b8
Fix withoutSemantic test sample files for CI failures
romainbrenguier b51cc95
Increase InternalCheckVerifier coverage: remove dead code and add flo…
romainbrenguier 478a677
Add no-op Autoscan Tests job to satisfy required check
romainbrenguier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -360,82 +360,13 @@ jobs: | |
| -DuseMissingFile \ | ||
| "-Dlicense.overrideUrl=file://${PWD}/override-dep-licenses.properties" | ||
|
|
||
| # TODO: Remove this no-op job once an admin removes "Autoscan Tests" from the required checks. | ||
| # The autoscan integration tests have been replaced by withoutSemantic() unit tests. | ||
| autoscan: | ||
| name: Autoscan Tests | ||
| needs: | ||
| - build | ||
| if: ${{ needs.build.outputs.deployed }} | ||
| runs-on: sonar-m-public | ||
| permissions: | ||
| id-token: write | ||
| contents: write | ||
| env: | ||
| BUILD_NUMBER: ${{ needs.build.outputs.build-number }} | ||
| SQ_VERSION: LATEST_RELEASE | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| # For now, the autoscan job need to execute two mvn commands: | ||
| # * The build of java-checks-test-sources module which requires Java 24. | ||
| # * The tests using Orchestrator and SonarQube that, for now, fail to work using Java 24 | ||
| - uses: jdx/mise-action@9e7f7633ff6f6d6048a9418a68d48f288f50eb14 # v4.2.3 | ||
| with: | ||
| version: 2026.7.18 | ||
| - uses: SonarSource/vault-action-wrapper@v3 | ||
| id: secrets | ||
| with: | ||
| secrets: | | ||
| development/kv/data/next url | SONAR_HOST_URL; | ||
| development/kv/data/next token | SONAR_TOKEN; | ||
| development/github/token/licenses-ro token | GITHUB_TOKEN; | ||
| - name: Ensure Separate Job Cache Key | ||
| uses: ./.github/actions/write-file | ||
| with: | ||
| file-path: target/just_for_cache_key_calculation/pom.xml | ||
| content: ${{ github.job }} | ||
| - uses: SonarSource/ci-github-actions/config-maven@v1 | ||
| with: | ||
| artifactory-reader-role: private-reader | ||
| use-develocity: ${{ env.USE_DEVELOCITY }} | ||
| develocity-url: ${{ env.DEVELOCITY_URL }} | ||
| - name: Compile Test Sources | ||
| env: | ||
| SONAR_HOST_URL: ${{ fromJSON(steps.secrets.outputs.vault).SONAR_HOST_URL }} | ||
| SONAR_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).SONAR_TOKEN }} | ||
| working-directory: java-checks-test-sources | ||
| run: | | ||
| mvn clean compile test-compile --batch-mode | ||
| - name: Select Java 21 | ||
| shell: bash | ||
| run: | | ||
| mise use java@21 | ||
| JAVA_21_HOME="$(mise where java@21)" | ||
| echo "JAVA_HOME=${JAVA_21_HOME}" >> "$GITHUB_ENV" | ||
| echo "${JAVA_21_HOME}/bin" >> "$GITHUB_PATH" | ||
| - name: Orchestrator Cache | ||
| uses: ./.github/actions/orchestrator-cache | ||
| with: | ||
| sq-version: ${{ env.SQ_VERSION }} | ||
| - name: Run autoscan tests | ||
| env: | ||
| SONAR_HOST_URL: ${{ fromJSON(steps.secrets.outputs.vault).SONAR_HOST_URL }} | ||
| SONAR_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).SONAR_TOKEN }} | ||
| GITHUB_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).GITHUB_TOKEN }} | ||
| working-directory: its/autoscan | ||
| run: > | ||
| mvn clean package --batch-mode --errors --show-version | ||
| --activate-profiles it-autoscan | ||
| -Dsonar.runtimeVersion="$SQ_VERSION" | ||
| -Dmaven.test.redirectTestOutputToFile=false | ||
| -Dparallel=methods | ||
| -DuseUnlimitedThreads=true | ||
| - name: Upload Actual Results On Failure | ||
| if: failure() | ||
| uses: ./.github/actions/upload-actual | ||
| with: | ||
| name: autoscan | ||
| it-dir: its/autoscan | ||
| expected-dir: src/test/resources/autoscan/diffs | ||
| actual-dir: target/actual/autoscan-diffs | ||
| - run: echo "Autoscan tests have been removed. This job is a no-op until the required check is removed by an admin." | ||
|
Comment on lines
+363
to
+369
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as discussed we can delete this TODO and job and raise a PR in re-services-config |
||
|
|
||
| qa-os-win: | ||
| name: Build and Unit Test on Windows | ||
|
|
@@ -473,7 +404,6 @@ jobs: | |
| - sanity | ||
| - test-analyze | ||
| - custom-rules-license-check | ||
| - autoscan | ||
| - qa-os-win | ||
| if: ${{ needs.build.outputs.deployed }} | ||
| runs-on: sonar-s-public | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We still have have autoscan comments in some of our test files.
I think they can be deleted.
UnusedTestRuleCheck_UseProtected
UnusedTestRuleCheck_Protected