Skip to content

Commit

Permalink
Add to test
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielnedersantos committed Dec 18, 2024
1 parent de71189 commit 2ec8a41
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/check_sonar_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ env:
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
PR_NUMBER: ${{ github.event.number }}
BRANCH_ORIGIN: ${{ github.head_ref }}
BASE_BRANCH: ${{ github.base_ref }}
SONAR_HOST_URL: "https://sonarqube.trustly.one"
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_SECRET }}
SONAR_PROJECT_KEY: "trustly-ios"
Expand All @@ -25,6 +27,14 @@ jobs:
with:
fetch-depth: 0

- name: Get Git Revision (Commit SHA)
id: git_revision
run: |
cd trustly-android-sdk || exit
git fetch origin "${BRANCH_ORIGIN}"
GIT_REVISION=$(git rev-parse origin/${BRANCH_ORIGIN})
echo "Git Revision: $GIT_REVISION"
- name: Install dependencies
run: |
# Update Homebrew
Expand All @@ -51,6 +61,10 @@ jobs:
run: |
# Create sonar-project.properties or update it dynamically
echo "sonar.login=${{ secrets.SONAR_TOKEN_SECRET }}" >> sonar-project.properties
echo "sonar.pullrequest.key=${{ github.event.number }}" >> sonar-project.properties
echo "sonar.pullrequest.branch=${{ github.head_ref }}" >> sonar-project.properties
echo "sonar.pullrequest.base=${{ github.base_ref }}" >> sonar-project.properties
echo "sonar.scm.revision=${GIT_REVISION}" >> sonar-project.properties
- name: Run Sonar-Swift Script
run: |
Expand Down

0 comments on commit 2ec8a41

Please sign in to comment.