feat: CPLYTM-656 CPLYTM-655 Create non-exist variables value in cac side when sync OSCAL CD #882
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
--- | |
name: Code Coverage Check | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
paths: | |
- '**.py' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4 | |
- name: Set up poetry and install | |
uses: ./.github/actions/setup-poetry | |
with: | |
python-version: "3.9" | |
- name: Run tests | |
run: make test-code-cov | |
- name: Upload artifact | |
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # pin@v4 | |
with: | |
name: coverage | |
path: coverage.xml | |
sonarcloud: | |
if: ${{ github.event.pull_request.base.repo.url == github.event.pull_request.head.repo.url }} | |
name: SonarCloud | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Get coverage | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # pin@v4 | |
with: | |
name: coverage | |
- name: SonarCloud Scan | |
uses: SonarSource/sonarqube-scan-action@f932b663acf3c4b8b27c673927b5ac744638b17b # pin@f932b663acf3c4b8b27c673927b5ac744638b17b | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
with: | |
args: > | |
-Dsonar.python.coverage.reportPaths=coverage.xml -Dsonar.tests=tests/ -Dsonar.sources=trestlebot/ -Dsonar.python.version=3.10 -Dsonar.projectKey=rh-psce_trestle-bot -Dsonar.organization=rh-psce | |
- name: SonarQube Quality Gate check | |
uses: sonarsource/sonarqube-quality-gate-action@f9fe214a5be5769c40619de2fff2726c36d2d5eb # pin@f9fe214a5be5769c40619de2fff2726c36d2d5eb | |
# Force to fail step after specific time | |
timeout-minutes: 5 | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |