Skip to content

dashboard: remove old dashlet code: _dashlet_context_vars #30911

dashboard: remove old dashlet code: _dashlet_context_vars

dashboard: remove old dashlet code: _dashlet_context_vars #30911

Workflow file for this run

# This is a simple entry point to execute the basic and most important Python
# tests for Checkmk. We run tools like ruff, black and our pytest based unit
# tests here. Some tests, like integration tests or tests of very specific
# components are not executed.
#
# We focus on the tests that are needed by external developers, e.g. to support
# check plugin development.
---
name: PR-CI
on: [push, pull_request]
jobs:
testing:
runs-on: ${{ matrix.os }}
env:
PYTHONWARNINGS: ignore:DeprecationWarning
# Avoid falling back to our internal bazel remote cache on github actions
BAZEL_CACHE_URL: ""
# Needed by "make .venv" to compute PYTHON_REQUIREMENTS_TEST
EDITION: community
strategy:
matrix:
os: [ubuntu-24.04]
steps:
- name: Remove unnecessary build tools
run: |
echo "Remove unnecessary directories:"
# to avoid running out of disk space we remove
# tools we don't need for this project
declare -i used_disk_before=$(df --block-size=$((1024*1024)) --output="used" / | tail -n 1)
declare -a tool_dirs=(
"/opt/ghc" # Haskell
"/usr/lib/google-cloud-sdk" # Google SDK
"/usr/lib/jvm" # Java
"/usr/local/.ghcup" # Haskell
"/usr/local/lib/android" # Android SDK
"/usr/local/share/chromium" # Chrome Browser
"/usr/local/share/powershell" # PowerShell
"/usr/share/dotnet" # .NET
"/usr/share/swift" # Swift
)
for tool_dir in ${tool_dirs[@]}; do
if [ -d "${tool_dir}" ]; then
echo "- ${tool_dir}"
sudo rm -rf "${tool_dir}"
fi
done
declare -i used_disk_after=$(df --block-size=$((1024*1024)) --output="used" / | tail -n 1)
echo "Saved disk space: $(((used_disk_before-used_disk_after)/1024))G"
- name: Set Environment Variables
run: |
# Using existing environment variables within another variables is not working in the jobs.*.env section
# more infos see: https://brandur.org/fragments/github-actions-env-vars-in-env-vars
echo "UV_CACHE_DIR=$HOME/.cache/uv" >> $GITHUB_ENV
- name: Checkout Repository
uses: actions/checkout@v3
- name: Cache uv
uses: actions/cache@v3
with:
key: uv-${{ matrix.os }}-${{ hashFiles('community-requirements.txt') }}
path: ${{ env.UV_CACHE_DIR }}
- name: Cache bazelisk
uses: actions/cache@v3
with:
key: ${{ hashFiles('.bazelversion', '.bazeliskrc') }}
path: |
~/.cache/bazelisk
- name: Cache bazel
uses: actions/cache@v3
with:
key: ${{ matrix.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE', 'MODULE.bazel') }}
path: |
~/.cache/bazel
restore-keys: |
${{ matrix.os }}-bazel-
- name: Setup Environment
run: |
# ksh: Needed for some "unit test" (test_mk_errpt_aix).
# librrd-dev: Needed for building rrdtool python bindings.
# libldap2-dev: Needed for building python-ldap.
# libsasl2-dev: Needed for building python-ldap.
# libkrb5-dev: Needed for building pykerberos.
# libglib2.0-dev: required by packages/glib and therfore transitive by python unit tests
# gettext: Needed for some "unit tests" (test_i18n.py)
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/ppa
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install ksh libpango1.0-dev librrd-dev libldap2-dev libsasl2-dev libkrb5-dev libglib2.0-dev gettext "^g\+\+-14$"
make .venv
# Keep next targets in sync with `test-github-actions.groovy`.
- name: Formatting
run: bazel run //:format.check
- name: Lint repo
run: bazel lint --fixes=false ...
- name: Check typing
run: make -C tests test-mypy-gpl
- name: Run Bandit
run: make -C tests test-bandit
- name: Run unit tests
run: make -C tests test-unit