-
Notifications
You must be signed in to change notification settings - Fork 3
feat(gitlab): bring GitLab rhiza_validate to parity with GitHub Actions equivalent #952
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -8,8 +8,10 @@ This directory contains GitLab CI/CD workflow configurations that mirror the fun | |||||||||||||||||||||||||||||
| .gitlab/ | ||||||||||||||||||||||||||||||
| ├── workflows/ | ||||||||||||||||||||||||||||||
| │ ├── rhiza_ci.yml # Continuous Integration - Python matrix testing | ||||||||||||||||||||||||||||||
| │ ├── rhiza_validate.yml # Rhiza configuration validation | ||||||||||||||||||||||||||||||
| │ ├── rhiza_validate.yml # Rhiza configuration validation, security and type checking | ||||||||||||||||||||||||||||||
| │ ├── rhiza_quality.yml # Quality checks (deptry, pre-commit, docs coverage, link check) | ||||||||||||||||||||||||||||||
| │ ├── rhiza_semgrep.yml # Semgrep static analysis (numpy rules) | ||||||||||||||||||||||||||||||
| │ ├── rhiza_license.yml # License compliance scan | ||||||||||||||||||||||||||||||
| │ ├── rhiza_marimo.yml # Marimo notebook execution and artefact publishing | ||||||||||||||||||||||||||||||
| │ ├── rhiza_book.yml # Documentation building (GitLab Pages) | ||||||||||||||||||||||||||||||
| │ ├── rhiza_sync.yml # Template synchronization | ||||||||||||||||||||||||||||||
|
|
@@ -41,15 +43,19 @@ This directory contains GitLab CI/CD workflow configurations that mirror the fun | |||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ### 2. Validate (`rhiza_validate.yml`) | ||||||||||||||||||||||||||||||
| **Purpose:** Validate Rhiza configuration against template. | ||||||||||||||||||||||||||||||
| **Purpose:** Validate Rhiza configuration against template, run security scans and type checking. | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| **Trigger:** | ||||||||||||||||||||||||||||||
| - On push to any branch | ||||||||||||||||||||||||||||||
| - On merge requests to main/master | ||||||||||||||||||||||||||||||
| - `pip-audit` job only runs on scheduled pipelines | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| **Key Features:** | ||||||||||||||||||||||||||||||
| - Runs `make validate`, which fires the full hook chain (`pre-validate`, `rhiza-test`, `uvx rhiza validate .`, `post-validate`) | ||||||||||||||||||||||||||||||
| - Skips validation in the rhiza repository itself (handled internally by `make validate`) | ||||||||||||||||||||||||||||||
| - Runs `make security` (pip-audit + bandit) on push/MR | ||||||||||||||||||||||||||||||
| - Runs `uvx pip-audit` on scheduled pipelines for dependency vulnerability scanning | ||||||||||||||||||||||||||||||
|
Comment on lines
+51
to
+57
|
||||||||||||||||||||||||||||||
| - `pip-audit` job only runs on scheduled pipelines | |
| **Key Features:** | |
| - Runs `make validate`, which fires the full hook chain (`pre-validate`, `rhiza-test`, `uvx rhiza validate .`, `post-validate`) | |
| - Skips validation in the rhiza repository itself (handled internally by `make validate`) | |
| - Runs `make security` (pip-audit + bandit) on push/MR | |
| - Runs `uvx pip-audit` on scheduled pipelines for dependency vulnerability scanning | |
| - Dedicated `pip-audit` job runs on scheduled pipelines and manually triggered (`web`) pipelines | |
| **Key Features:** | |
| - Runs `make validate`, which fires the full hook chain (`pre-validate`, `rhiza-test`, `uvx rhiza validate .`, `post-validate`) | |
| - Skips validation in the rhiza repository itself (handled internally by `make validate`) | |
| - Runs `make security` (pip-audit + bandit) on push/MR | |
| - Runs `uvx pip-audit` on scheduled and manually triggered (`web`) pipelines for dependency vulnerability scanning |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -13,8 +13,17 @@ license:check: | |||||||||||||
| stage: test | ||||||||||||||
| needs: [] | ||||||||||||||
| image: ghcr.io/astral-sh/uv:0.9.30-bookworm | ||||||||||||||
| variables: | ||||||||||||||
| UV_EXTRA_INDEX_URL: "${UV_EXTRA_INDEX_URL}" | ||||||||||||||
| script: | ||||||||||||||
| - make license | ||||||||||||||
| - uv run --with pip-licenses pip-licenses --format markdown --output-file LICENSES.md | ||||||||||||||
| artifacts: | ||||||||||||||
| name: LICENSES.md | ||||||||||||||
| paths: | ||||||||||||||
| - LICENSES.md | ||||||||||||||
| when: always | ||||||||||||||
| expire_in: 30 days | ||||||||||||||
| rules: | ||||||||||||||
|
||||||||||||||
| rules: | |
| rules: | |
| - if: '$CI_PIPELINE_SOURCE == "schedule"' | |
| when: never | |
| - if: '$CI_PIPELINE_SOURCE == "web"' | |
| when: never |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -3,9 +3,13 @@ | |||||||||||||
| # | ||||||||||||||
| # Workflow: Rhiza Validate (GitLab CI) | ||||||||||||||
| # | ||||||||||||||
| # Purpose: Validates Rhiza configuration | ||||||||||||||
| # Purpose: Validates Rhiza configuration, runs security scans, type checking, | ||||||||||||||
| # and scheduled dependency vulnerability audits. | ||||||||||||||
| # | ||||||||||||||
| # Trigger: This workflow runs on every push and on merge requests to main/master | ||||||||||||||
| # Trigger: This workflow runs on every push and on merge requests to main/master. | ||||||||||||||
| # pip-audit runs only on scheduled pipelines. | ||||||||||||||
| # | ||||||||||||||
|
Comment on lines
+10
to
+11
|
||||||||||||||
| # pip-audit runs only on scheduled pipelines. | |
| # | |
| # pip-audit runs on scheduled pipelines and on manually-triggered | |
| # (web) pipelines. |
Copilot
AI
Mar 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For parity with the GitHub Actions workflow, validate:security currently skips scheduled pipelines but still runs on CI_PIPELINE_SOURCE == "web" (manual runs). In GitHub, the security job is explicitly skipped on workflow_dispatch. If parity is the goal, add a web skip rule here (or update the parity/docs statement accordingly).
| when: never | |
| when: never | |
| - if: $CI_PIPELINE_SOURCE == "web" | |
| when: never |
Copilot
AI
Mar 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validate:pip-audit runs uvx pip-audit without the CVE ignore that make security applies (Makefile security target passes --ignore-vuln CVE-2026-4539). This will make the scheduled/manual audit behave differently from the security job and may cause the audit job to fail when the security job passes. Consider invoking the same shared configuration (e.g., a make target or the same ignore flags) here.
| script: | |
| - uvx pip-audit | |
| variables: | |
| UV_EXTRA_INDEX_URL: "${UV_EXTRA_INDEX_URL}" | |
| script: | |
| - make security |
Copilot
AI
Mar 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For parity with the GitHub Actions workflow, validate:typecheck currently skips scheduled pipelines but still runs on CI_PIPELINE_SOURCE == "web" (manual runs). In GitHub, the typecheck job is skipped on workflow_dispatch. If parity is the goal, add a web skip rule here (or update the parity/docs statement accordingly).
| when: never | |
| when: never | |
| - if: $CI_PIPELINE_SOURCE == "web" | |
| when: never |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These includes will also apply on scheduled and
webpipelines because the rules only check$CI_COMMIT_BRANCH/ MR events. The GitHub equivalent skips semgrep/license on schedule and workflow_dispatch, and the new.gitlab/README.mdtrigger descriptions also omit schedule/manual for these workflows. Consider adding explicitschedule(and possiblyweb)when: neverrules here to avoid running Semgrep/license on scheduled/manual pipelines.