/
githubmirror
/
adcli
Обзор
Документация
Войти
/
githubmirror
/
adcli
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
.gitlab-ci.yml
94 строки
2 KB
shridhargadekar
adcli CI configuration
05 май 2026, 22:55
05 май 2026, 22:55
e69f726
Код
Авторство
О чём код?
# GitLab CI configuration for adcli # Runs tests automatically when MR is created stages: - build - test # Default settings for all jobs default: # Use Fedora 44 image: registry.fedoraproject.org/fedora:44 before_script: - dnf install -y git # Template for build jobs .build_template: stage: build script: - dnf builddep adcli -y - dnf install -y libnetapi-devel selinux-policy-devel || true - ./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var - make -j$(nproc) - make check artifacts: paths: - library/libadcli.la - tools/adcli expire_in: 1 hour # Build on Fedora 44 build:fedora: extends: .build_template image: registry.fedoraproject.org/fedora:44 # Build on CentOS Stream 10 build:centos10: extends: .build_template image: quay.io/centos/centos:stream10 before_script: - dnf install -y 'dnf-command(config-manager)' - dnf config-manager --set-enabled crb - dnf install -y git # Code quality checks lint:shellcheck: stage: test image: koalaman/shellcheck-alpine:latest before_script: [] # Override default - Alpine doesn't have dnf script: - | if ls tools/*.sh 1> /dev/null 2>&1; then shellcheck tools/*.sh else echo "No shell scripts found in tools/, skipping shellcheck" fi allow_failure: true rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' # Python code quality checks (using Ruff - fast, all-in-one linter) lint:python: stage: test image: registry.fedoraproject.org/fedora:44 script: - dnf install -y ruff - | if [ -d "tests" ]; then cd tests # Find all Python files in tests directory TEST_FILES=$(find . -name "*.py" -type f) if [ -z "$TEST_FILES" ]; then echo "No Python files found, skipping Python linting" exit 0 fi echo "Running ruff check (replaces flake8, isort, pycodestyle)..." ruff check $TEST_FILES echo "Running ruff format check (replaces black)..." ruff format --check $TEST_FILES else echo "No tests directory found, skipping Python linting" fi rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' # Workflow rules - when to run pipelines workflow: rules: # Run on merge requests - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' # Run on main/master branch - if: '$CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "master"' # Run on tags - if: '$CI_COMMIT_TAG'