|
1 | | -name: Sonar Cloud Analysis |
| 1 | +name: Tests |
| 2 | + |
2 | 3 | permissions: |
3 | 4 | contents: read |
4 | 5 |
|
5 | 6 | concurrency: |
6 | | - group: sonarcloud-${{ github.ref }} |
| 7 | + group: tests-${{ github.ref }} |
7 | 8 | cancel-in-progress: true |
8 | 9 |
|
9 | 10 | on: |
|
17 | 18 |
|
18 | 19 | jobs: |
19 | 20 | unit-tests: |
20 | | - name: SonarCloud / Unit Tests |
| 21 | + name: Tests |
21 | 22 | timeout-minutes: 30 |
22 | 23 | if: ${{ ((github.event.pull_request.merged == true && github.base_ref == 'master') || |
23 | 24 | (github.event_name == 'workflow_dispatch' || |
|
53 | 54 | TEST_THREAD_ID: ${{ vars.TEST_THREAD_ID }} |
54 | 55 | TEST_MESSAGE_ID: ${{ vars.TEST_MESSAGE_ID }} |
55 | 56 | TEST_USER_NAME: ${{ vars.TEST_USER_NAME }} |
56 | | - |
57 | | - - name: Store project information |
58 | | - shell: bash |
59 | | - id: version |
60 | | - run: | |
61 | | - VERSION=$(uv run pyproject-info project.version | tr -d '"'); echo "app-version=$VERSION" >> "$GITHUB_OUTPUT" |
62 | | - NAME=$(uv run pyproject-info project.name | tr -d '"'); echo "app-name=$NAME" >> "$GITHUB_OUTPUT" |
63 | | - echo "github-repository=$(echo $GITHUB_REPOSITORY | cut -d'/' -f2)" >> "$GITHUB_OUTPUT" |
64 | | -
|
65 | | - - name: SonarCloud / Run SonarCloud action |
66 | | - uses: SonarSource/sonarqube-scan-action@aa494459d7c39c106cc77b166de8b4250a32bb97 # v5 |
67 | | - if: ${{ env.IS_INDITEXTECH_REPO == 'false' }} |
68 | | - env: |
69 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
70 | | - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
71 | | - with: |
72 | | - projectBaseDir: . |
73 | | - args: > |
74 | | - -Dsonar.organization=inditextech |
75 | | - -Dsonar.projectKey=InditexTech_${{ steps.version.outputs.github-repository }} |
76 | | - -Dsonar.projectName=${{ steps.version.outputs.app-name }} |
77 | | - -Dsonar.projectVersion=${{ steps.version.outputs.app-version }} |
78 | | - -Dsonar.branch.name=${{ github.base_ref || github.ref_name }} |
79 | | - -Dsonar.host.url="https://sonarcloud.io/" |
80 | | - -Dsonar.verbose=true |
81 | | - -Dsonar.token=${SONAR_TOKEN} |
82 | | - -Dsonar.python.version=3.10 |
83 | | - -Dsonar.python.coverage.reportPaths=coverage*.xml |
0 commit comments