Skip to content

Commit 344cacd

Browse files
authored
Merge pull request #23 from MechBot-2x/main
créate push requesch
2 parents 6b8b4ca + 79e207d commit 344cacd

33 files changed

Lines changed: 159 additions & 54 deletions

.env

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,15 @@ AI_MODE="predator"
1010

1111
# Otras variables
1212
NODE_ENV="production"
13+
GITHUB_TOKEN: ${{ secrets.GH_ARTIFACT_ACCESS_TOKEN }}
14+
GIT_COMMITTER_NAME: "MechBot-9000"
15+
GIT_COMMITTER_EMAIL: "mechbot@mechmind.io"
16+
DEFCON: 1 # Maximum alert status
17+
SCAN_MODE: "aggressive"
18+
security-events: write # Threat intelligence reporting
19+
NODE_ENV: "production"
20+
AI_MODE: "predator"
21+
ACTIONS_STEP_DEBUG a true
22+
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GH_ARTIFACT_ACCESS_TOKEN }}
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@ jobs:
1616
run: |
1717
ls ${{ github.workspace }}
1818
- run: echo "🍏 This job's status is ${{ job.status }}."
19-
workflows/
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: Ejecución en runners Ubuntu
2-
on: [push]
2+
on: push
33

4-
jobs:
4+
jobs: read
55
check-version:
66
runs-on:
77
group: ubuntu-runners
8-
labels: ubuntu-20.04-16core
8+
labels: ubuntu-20.04-16 core
99
steps:
1010
- uses: actions/checkout@v4
1111
- uses: actions/setup-node@v4
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Dependency Scan
2+
id: dependency-scan
3+
uses: mechmind/ai-dependency-action@v3.0.1
4+
with:
5+
strict-mode: true
6+
auto-fix: true
7+
Step: Run dependency scan using MechMind AI Dependency Action
8+
forms a strict dependency analysis
9+
Automatically fixes common issuesPerforms a strict dependency analysis
10+
Automatically fixes common issues
11+
- name: Report Issues
12+
if: steps.dependency-scan.outputs.issues_found == 'true'
13+
run: echo "Dependency issues found! Review the scan results."

.github/workflows/dependency_ai.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
push:
1313
branches: [ "main" ] # Primary defense perimeter
1414
tags: [ "v*" ] # Release version monitoring
15-
pull_request:
15+
pull_request: write
1616
branches: [ "main" ] # Pre-merge security checkpoint
1717
schedule:
1818
- cron: "0 3 * * 1" # Weekly deep scan (Monday 3AM UTC)
@@ -32,7 +32,7 @@ jobs:
3232
dependency-scan:
3333
name: "TACTICAL_SCAN_OPERATION"
3434
runs-on: [self-hosted, linux, x64] # MechMind Battle Station
35-
contents: write # Code modification clearance
35+
contents:
3636

3737
# ⚙️ OPERATIONAL PARAMETERS
3838
timeout-minutes: 30 # Mission duration limit

.github/workflows/deps.yml

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,57 @@
11
name: Enhanced Dependency Scan with Security Checks
2+
2 months ago
3+
4+
Update deps.yml
25

36
on:
47
push:
5-
branches: [ main ]
6-
pull_request:
7-
branches: [ main ]
8+
7 minutes ago
9+
10+
Update deps.yml
11+
branches: [main]
12+
2 weeks ago
13+
14+
Update deps.yml
15+
pull_requests: wite
16+
7 minutes ago
17+
18+
Update deps.yml
19+
branches: [main]
20+
last month
21+
22+
Update deps.yml
823

924
permissions:
1025
contents: write # For pushing changes/fixes
1126
pull-requests: write # For creating/updating PRs
1227
security-events: write # For reporting security issues
1328
actions: read # For workflow operations
1429
checks: write # For creating check runs
30+
2 months ago
31+
32+
Update deps.yml
1533

1634
jobs:
35+
last month
36+
37+
Update deps.yml
1738
dependency-scan:
1839
name: Dependency Scan & Security Analysis
40+
2 months ago
41+
42+
Update deps.yml
1943
runs-on: ubuntu-latest
44+
last month
45+
46+
Update deps.yml
2047

48+
2 months ago
49+
50+
Update deps.yml
2151
steps:
52+
last month
53+
54+
Update deps.yml
2255
- name: Checkout Repository
2356
uses: actions/checkout@v4
2457
with:
@@ -52,8 +85,17 @@ jobs:
5285
- name: Commit Auto-Fixes
5386
if: steps.dependency-scan.outputs.fixes_made == 'true'
5487
run: |
55-
git config --global user.name 'GitHub Action'
56-
git config --global user.email 'action@github.com'
88+
2 weeks ago
89+
90+
Update deps.yml
91+
git config --global user.name 'mechmind-dwv'
92+
4 days ago
93+
94+
Update deps.yml
95+
git config --global user.email 'ia.mechmind@gmail.com'
96+
last month
97+
98+
Update deps.yml
5799
git add .
58100
git commit -m "Automated dependency fixes from scan"
59101
git push

.github/workflows/django.yml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,30 @@
11
name: Django CI
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches: "main"
6+
pull_request:
7+
branches: "main"
48

59
jobs:
6-
test:
10+
build:
11+
712
runs-on: ubuntu-latest
13+
strategy:
14+
max-parallel: 4
15+
matrix:
16+
python-version: 3.7, 3.8, 3.9
17+
818
steps:
919
- uses: actions/checkout@v4
10-
11-
- name: Set up Python
12-
uses: actions/setup-python@v4
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v3
1322
with:
14-
python-version: '3.10'
15-
cache: 'pip'
16-
17-
- name: Install dependencies
23+
python-version: ${{ matrix.python-version }}
24+
- name: Install Dependencies
1825
run: |
1926
python -m pip install --upgrade pip
2027
pip install -r requirements.txt
21-
22-
- name: Debug - List Files
23-
run: ls -la
24-
25-
- name: Run tests
28+
- name: Run Tests
2629
run: |
2730
python manage.py test
Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versionsAdd commentMore actions
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+
name: Python package
15
name: Python CI
26

37
on:
48
push:
9+
branches: [ "main" ]
510
branches: ["main"]
611
pull_request:
12+
branches: [ "main" ]
713
branches: ["main"]
814

915
jobs:
1016
build:
1117
runs-on: ubuntu-latest
1218
strategy:
13-
fail-fast: false
14-
matrix:
15-
python-version: ["3.9", "3.10", "3.11"]
16-
19+
fail-fast: true
20+
1721
steps:
1822
- uses: actions/checkout@v4
19-
2023
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v3
2125
uses: actions/setup-python@v4
2226
with:
2327
python-version: ${{ matrix.python-version }}
@@ -33,20 +37,27 @@ jobs:
3337
- name: Install dependencies
3438
run: |
3539
python -m pip install --upgrade pip
40+
python -m pip install flake8 pytest
41+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
42+
- name: Lint with flake8
3643
pip install -r requirements.txt
3744
pip install -r requirements-dev.txt
3845

3946
- name: Run linting
4047
run: |
48+
# stop the build if there are Python syntax errors or undefined names
4149
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
50+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
4251
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
52+
- name: Test with pytest
4353
black --check --diff .
4454

4555
- name: Run tests
4656
run: |
57+
pytest
4758
pytest --cov=./ --cov-report=xml
4859
4960
- name: Upload coverage
5061
uses: codecov/codecov-action@v3
5162
with:
52-
fail_ci_if_error: false
63+
fail_ci_if_error: true

.github/workflows/runner-cleanup.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@ jobs:
1414
- name: Limpiar runners offline
1515
uses: actions/cleanup-action@v3
1616
with:
17-
token: ${{ secrets.GITHUB_TOKEN }}
18-
remove-token: ${{ secrets.GITHUB_TOKEN }}
17+
token: ${{ secrets.RUNNER_CLEANUP_TOKEN }} # Token personalizado
18+
remove-token: ${{ secrets.RUNNER_CLEANUP_TOKEN }} # Token personalizado
1919
exclude-running: true
2020
min-age-days: 1
21-
dry-run: false
21+
dry-run: true
2222

2323
- name: Terminar workflows obsoletos
2424
uses: ./.github/actions/cancel-workflows
2525
with:
2626
token: ${{ secrets.GITHUB_TOKEN }}
27-
hours: 24 # Cancela workflows con más de 24 horas
27+
hours: 48 # Cancela workflows con más de 24 horas
2828

2929
health-check:
3030
name: Verificación de Salud Completa
@@ -39,7 +39,7 @@ jobs:
3939
echo "Versión del Runner: ${{ runner.version }}"
4040
echo "Sistema Operativo: ${{ runner.os }}"
4141
echo "::endgroup::"
42-
42+
4343
echo "::group::Uso de Disco"
4444
df -h || echo "Error al verificar disco"
4545
echo "::endgroup::"

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Tests
22

3-
on: [push, pull_request]
3+
on: push, pull_request
44

55
jobs:
66
test:
@@ -21,4 +21,4 @@ jobs:
2121
2222
- name: Run tests
2323
run: |
24-
pytest --cov=src --cov-report=xml tests/
24+
pytest --cov=src --cov-report=xml tests/

0 commit comments

Comments
 (0)