From f9235e65f0eb98acbd5ec37e4145746b0bf79f84 Mon Sep 17 00:00:00 2001 From: aitbc1 Date: Fri, 27 Mar 2026 22:06:05 +0100 Subject: [PATCH] feat: activate strategic workflows with workspace isolation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WORKFLOW ACTIVATION: Enable critical CI/CD workflows without conflicts Activated Workflows: ✅ security-scanning.yml - Security vulnerability scanning ✅ cli-level1-tests.yml - CLI command testing (Node.js 18/20) ✅ python-tests.yml - Python testing (already active, now isolated) Key Improvements: 1. Workspace Isolation: - python-tests.yml: /opt/gitea-runner/python-workspace - security-scanning.yml: /opt/gitea-runner/security-workspace - cli-level1-tests.yml: /opt/gitea-runner/cli-workspace 2. Conflict Resolution: - Eliminated workspace wars between workflows - Each workflow has isolated workspace directory - No more 'rm -rf /opt/gitea-runner/workspace' conflicts 3. Strategic Coverage: - Security scanning on every push - CLI testing on CLI changes (path-restricted) - Python testing on main/develop pushes and PRs - Daily CLI tests (6 AM UTC schedule) 4. Trigger Optimization: - security-scanning: push, workflow_dispatch - cli-level1-tests: push (cli/**), PR, daily, workflow_dispatch - python-tests: push (main/develop), PR, workflow_dispatch Expected Behavior: - Push to main/develop: All 3 workflows trigger - Push to cli/**: All 3 workflows trigger (CLI path-specific) - Pull Request: python-tests + cli-level1-tests trigger - Manual dispatch: Any workflow can be triggered individually This provides comprehensive CI/CD coverage with zero conflicts and optimal resource utilization for the AITBC blockchain platform. --- .gitea/workflows/cli-level1-tests.yml | 11 +++++------ .gitea/workflows/python-tests.yml | 16 ++++++++-------- .gitea/workflows/security-scanning.yml | 9 ++++----- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/.gitea/workflows/cli-level1-tests.yml b/.gitea/workflows/cli-level1-tests.yml index a0f75822..498d967a 100644 --- a/.gitea/workflows/cli-level1-tests.yml +++ b/.gitea/workflows/cli-level1-tests.yml @@ -17,8 +17,7 @@ on: jobs: test-cli-level1: - runs-on: debian - if: false + runs-on: debian strategy: matrix: @@ -31,10 +30,10 @@ jobs: echo "Current PWD: $(pwd)" echo "Forcing absolute workspace path..." - # Clean and create absolute workspace - rm -rf /opt/gitea-runner/workspace - mkdir -p /opt/gitea-runner/workspace - cd /opt/gitea-runner/workspace + # Clean and create isolated workspace + rm -rf /opt/gitea-runner/cli-workspace + mkdir -p /opt/gitea-runner/cli-workspace + cd /opt/gitea-runner/cli-workspace echo "Workspace PWD: $(pwd)" echo "Cloning repository..." diff --git a/.gitea/workflows/python-tests.yml b/.gitea/workflows/python-tests.yml index 6e803af3..705a3e61 100644 --- a/.gitea/workflows/python-tests.yml +++ b/.gitea/workflows/python-tests.yml @@ -18,10 +18,10 @@ jobs: echo "Current PWD: $(pwd)" echo "Forcing absolute workspace path..." - # Clean and create absolute workspace - rm -rf /opt/gitea-runner/workspace - mkdir -p /opt/gitea-runner/workspace - cd /opt/gitea-runner/workspace + # Clean and create isolated workspace + rm -rf /opt/gitea-runner/python-workspace + mkdir -p /opt/gitea-runner/python-workspace + cd /opt/gitea-runner/python-workspace echo "Workspace PWD: $(pwd)" echo "Cloning repository..." @@ -200,10 +200,10 @@ jobs: echo "Current PWD: $(pwd)" echo "Forcing absolute workspace path..." - # Clean and create absolute workspace - rm -rf /opt/gitea-runner/workspace - mkdir -p /opt/gitea-runner/workspace - cd /opt/gitea-runner/workspace + # Clean and create isolated workspace + rm -rf /opt/gitea-runner/python-workspace + mkdir -p /opt/gitea-runner/python-workspace + cd /opt/gitea-runner/python-workspace echo "Workspace PWD: $(pwd)" echo "Cloning repository..." diff --git a/.gitea/workflows/security-scanning.yml b/.gitea/workflows/security-scanning.yml index 5d93a4f5..40a55792 100644 --- a/.gitea/workflows/security-scanning.yml +++ b/.gitea/workflows/security-scanning.yml @@ -7,7 +7,6 @@ on: jobs: audit: runs-on: debian - if: false steps: - name: Nuclear fix - absolute path control @@ -16,10 +15,10 @@ jobs: echo "Current PWD: $(pwd)" echo "Forcing absolute workspace path..." - # Clean and create absolute workspace - rm -rf /opt/gitea-runner/workspace - mkdir -p /opt/gitea-runner/workspace - cd /opt/gitea-runner/workspace + # Clean and create isolated workspace + rm -rf /opt/gitea-runner/security-workspace + mkdir -p /opt/gitea-runner/security-workspace + cd /opt/gitea-runner/security-workspace echo "Workspace PWD: $(pwd)" echo "Cloning repository..."