Update several dependencies. #18893
This file contains 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: SonarCloud | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
sonarcloud: | |
runs-on: ubuntu-latest | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
steps: | |
- name: Login to DockerHub | |
if: env.SONAR_TOKEN != null | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- uses: actions/[email protected] | |
if: env.SONAR_TOKEN != null | |
with: | |
fetch-depth: 0 # Disabling shallow clone is recommended for improving relevancy of reporting | |
- name: Install uv | |
if: env.SONAR_TOKEN != null | |
uses: astral-sh/setup-uv@v4 | |
with: | |
version: "0.4.22" | |
- name: Set up Node | |
if: env.SONAR_TOKEN != null | |
uses: actions/[email protected] | |
with: | |
node-version: "22" | |
- name: Collector | |
if: env.SONAR_TOKEN != null | |
working-directory: components/collector | |
run: | | |
uv venv | |
ci/pip-install.sh | |
ci/unittest.sh | |
export PYTHONPATH=`python -c 'import sys;print(":".join(sys.argv[1:]))' src $PYTHONPATH` | |
.venv/bin/python -m xmlrunner --output-file build/unittests.xml | |
- name: Notifier | |
if: env.SONAR_TOKEN != null | |
working-directory: components/notifier | |
run: | | |
uv venv | |
ci/pip-install.sh | |
ci/unittest.sh | |
export PYTHONPATH=`python -c 'import sys;print(":".join(sys.argv[1:]))' src $PYTHONPATH` | |
.venv/bin/python -m xmlrunner --output-file build/unittests.xml | |
- name: API-server | |
if: env.SONAR_TOKEN != null | |
working-directory: components/api_server | |
run: | | |
uv venv | |
ci/pip-install.sh | |
ci/unittest.sh | |
export PYTHONPATH=`python -c 'import sys;print(":".join(sys.argv[1:]))' src $PYTHONPATH` | |
.venv/bin/python -m xmlrunner --output-file build/unittests.xml | |
- name: Shared Code | |
if: env.SONAR_TOKEN != null | |
working-directory: components/shared_code | |
run: | | |
uv venv | |
ci/pip-install.sh | |
ci/unittest.sh | |
export PYTHONPATH=`python -c 'import sys;print(":".join(sys.argv[1:]))' src $PYTHONPATH` | |
.venv/bin/python -m xmlrunner --output-file build/unittests.xml | |
- name: Frontend | |
if: env.SONAR_TOKEN != null | |
working-directory: components/frontend | |
run: | | |
npm install --ignore-scripts | |
npm run --ignore-scripts build --if-present | |
npm test -- --coverage | |
env: | |
CI: true | |
- name: Create packages | |
if: env.SONAR_TOKEN != null | |
run: | | |
touch components/__init__.py | |
touch components/api_server/__init__.py | |
touch components/api_server/src/__init__.py | |
touch components/collector/__init__.py | |
touch components/collector/src/__init__.py | |
touch components/notifier/__init__.py | |
touch components/notifier/src/__init__.py | |
touch components/shared_code/__init__.py | |
touch components/shared_code/src/__init__.py | |
- name: Sonarcloud scan | |
if: env.SONAR_TOKEN != null | |
uses: sonarsource/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |