|
| 1 | +name: Shadow Analysis |
| 2 | +on: |
| 3 | + schedule: |
| 4 | + # Nightly job |
| 5 | + - cron: '0 2 * * *' |
| 6 | + workflow_dispatch: |
| 7 | + |
| 8 | +concurrency: |
| 9 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 10 | + cancel-in-progress: true |
| 11 | + |
| 12 | +jobs: |
| 13 | + coverage: |
| 14 | + name: "Coverage report generation" |
| 15 | + runs-on: github-ubuntu-latest-s |
| 16 | + needs: [install_deps] |
| 17 | + permissions: |
| 18 | + id-token: write |
| 19 | + contents: write |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 |
| 22 | + - uses: ./.github/actions/config-poetry |
| 23 | + - run: | |
| 24 | + poetry run pytest --cov-report=xml:coverage.xml --cov-config=pyproject.toml --cov=src --cov-branch tests |
| 25 | + poetry run mypy src/ > mypy-report.txt || true |
| 26 | + - name: Upload coverage artifacts |
| 27 | + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 |
| 28 | + with: |
| 29 | + name: coverage-reports |
| 30 | + path: | |
| 31 | + coverage.xml |
| 32 | + mypy-report.txt |
| 33 | +
|
| 34 | + analysis-shadow-sqc-eu: |
| 35 | + name: "SQC-EU Shadow Analysis" |
| 36 | + needs: [coverage] |
| 37 | + runs-on: github-ubuntu-latest-s |
| 38 | + if: github.ref == 'refs/heads/master' |
| 39 | + permissions: |
| 40 | + id-token: write |
| 41 | + contents: write |
| 42 | + steps: |
| 43 | + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 44 | + - name: Download coverage artifacts |
| 45 | + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 |
| 46 | + with: |
| 47 | + name: coverage-reports |
| 48 | + - uses: jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 #v3.3.1 |
| 49 | + with: |
| 50 | + |
| 51 | + - run: mise use -g [email protected] |
| 52 | + - uses: SonarSource/ci-github-actions/build-poetry@v1 |
| 53 | + env: |
| 54 | + sonar-platform: sqc-eu |
| 55 | + artifactory-reader-role: private-reader |
| 56 | + artifactory-deployer-role: qa-deployer |
| 57 | + |
| 58 | + analysis-shadow-sqc-us: |
| 59 | + name: "SQC-US Shadow Analysis" |
| 60 | + needs: [coverage] |
| 61 | + runs-on: sonar-s-public |
| 62 | + if: github.ref == 'refs/heads/master' |
| 63 | + permissions: |
| 64 | + id-token: write |
| 65 | + contents: write |
| 66 | + steps: |
| 67 | + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 68 | + - name: Download coverage artifacts |
| 69 | + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 |
| 70 | + with: |
| 71 | + name: coverage-reports |
| 72 | + - uses: jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 #v3.3.1 |
| 73 | + with: |
| 74 | + |
| 75 | + - run: mise use -g [email protected] |
| 76 | + - uses: SonarSource/ci-github-actions/build-poetry@v1 |
| 77 | + env: |
| 78 | + sonar-platform: sqc-us |
| 79 | + artifactory-reader-role: private-reader |
| 80 | + artifactory-deployer-role: qa-deployer |
| 81 | + |
0 commit comments