Skip to content

ci: add sonar cloud setting #2

ci: add sonar cloud setting

ci: add sonar cloud setting #2

name: coverage-test
on:
pull_request:
types: [opened, synchronize]
paths: [driving_log_replayer/**, .github/workflows/coverage-test.yaml]
push:
branches:
- main
jobs:
driving_log_replayer:
name: main package pytest coverage
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: [3.10]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Execute pytest
run: |
./tests.sh
- name: Upload Unit Test Output
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: main_package
path: test-output/**/*.xml # to be updated
report-test-result:
name: Get and upload Test Result
runs-on: ubuntu-latest
timeout-minutes: 5
if: ${{ !cancelled() }}
needs:
- driving_log_replayer
steps:
- uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}