mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-29 17:49:14 +00:00
Use GA for sonar (#5142)
This commit is contained in:
parent
591a65d161
commit
a26d1b15a2
26
.github/workflows/py-tests-3_9.yml
vendored
26
.github/workflows/py-tests-3_9.yml
vendored
@ -68,28 +68,10 @@ jobs:
|
||||
source env/bin/activate
|
||||
make coverage
|
||||
|
||||
- name: Run PR Sonar
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
if: ${{ github.event_name == 'pull_request_target' }}
|
||||
run: |
|
||||
git fetch --no-tags https://github.com/open-metadata/OpenMetadata.git +refs/heads/main:refs/remotes/origin/main
|
||||
|
||||
# Add PR analysis information
|
||||
echo "\nsonar.pullrequest.key=${{ github.event.pull_request.number }}" >> ingestion/sonar-project.properties
|
||||
echo "sonar.pullrequest.branch=${{ github.head_ref }}" >> ingestion/sonar-project.properties
|
||||
echo "sonar.pullrequest.base=main" >> ingestion/sonar-project.properties
|
||||
echo "sonar.pullrequest.github.repository=OpenMetadata" >> ingestion/sonar-project.properties
|
||||
echo "sonar.scm.revision=${{ github.event.pull_request.head.sha }}" >> ingestion/sonar-project.properties
|
||||
echo "sonar.pullrequest.provider=github" >> ingestion/sonar-project.properties
|
||||
|
||||
# Validate new properties
|
||||
cat ingestion/sonar-project.properties
|
||||
|
||||
make token=${{ secrets.INGESTION_SONAR_SECRET }} sonar_ingestion
|
||||
|
||||
- name: Run Sonar
|
||||
uses: sonarsource/sonarcloud-github-action@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
run: make token=${{ secrets.INGESTION_SONAR_SECRET }} sonar_ingestion
|
||||
SONAR_TOKEN: ${{ secrets.INGESTION_SONAR_SECRET }}
|
||||
with:
|
||||
projectBaseDir: ingestion
|
||||
|
||||
@ -45,4 +45,8 @@ package_dir =
|
||||
|
||||
[options.packages.find]
|
||||
where = src
|
||||
include = *
|
||||
include = *
|
||||
|
||||
[coverage:run]
|
||||
relative_files = True
|
||||
branch = True
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user