Skip to content

Commit 788d94c

Browse files
authored
Merge pull request #54 from Nkwenti-Severian-Ndongtsop/develop
refactoring of workflows
2 parents f9f4654 + ccb0468 commit 788d94c

24 files changed

Lines changed: 173 additions & 186 deletions

.github/workflows/ai-model.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ jobs:
3030
name: Validate AI Model
3131
runs-on: ubuntu-latest
3232
steps:
33-
- uses: actions/checkout@v3
33+
- uses: actions/checkout@v4
3434

3535
- name: Set up Python
36-
uses: actions/setup-python@v4
36+
uses: actions/setup-python@v5
3737
with:
3838
python-version: "3.10"
3939
cache: 'pip'
@@ -65,7 +65,7 @@ jobs:
6565
exit 0
6666
6767
- name: Upload test results
68-
uses: actions/upload-artifact@v3
68+
uses: actions/upload-artifact@v4
6969
with:
7070
name: test-results
7171
path: |

.github/workflows/ci.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
name: CI
22

33
on:
4-
push:
5-
branches: [ main, develop ]
6-
paths-ignore:
7-
- 'docs/**'
8-
- '**.md'
9-
- '.github/*.yml'
10-
pull_request:
11-
branches: [ main, develop ]
12-
paths-ignore:
13-
- 'docs/**'
14-
- '**.md'
15-
- '.github/*.yml'
164
workflow_dispatch:
175

186
env:

.github/workflows/code-quality.yml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -80,25 +80,6 @@ jobs:
8080
fi
8181
continue-on-error: true
8282

83-
- name: Generate quality report
84-
if: always()
85-
run: |
86-
echo "## Code Quality Report" > quality-report.md
87-
echo "### Status" >> quality-report.md
88-
echo "- Formatting: ${{ job.steps.black.outcome || 'SKIPPED' }}" >> quality-report.md
89-
echo "- Imports: ${{ job.steps.isort.outcome || 'SKIPPED' }}" >> quality-report.md
90-
echo "- Linting: ${{ job.steps.lint.outcome || 'SKIPPED' }}" >> quality-report.md
91-
echo "- Type Check: ${{ job.steps.mypy.outcome || 'SKIPPED' }}" >> quality-report.md
92-
echo "### Summary" >> quality-report.md
93-
echo "Quality checks completed with non-blocking warnings." >> quality-report.md
94-
- name: Upload quality report
95-
if: always()
96-
uses: actions/upload-artifact@v4
97-
with:
98-
name: code-quality-report
99-
path: quality-report.md
100-
retention-days: 5
101-
10283
documentation:
10384
runs-on: ubuntu-latest
10485
steps:

.github/workflows/dependencies.yml

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,6 @@
11
name: Dependency Management
22

33
on:
4-
push:
5-
paths:
6-
- 'requirements*.txt'
7-
- 'pyproject.toml'
8-
- 'poetry.lock'
9-
- 'package.json'
10-
- 'package-lock.json'
11-
- '.github/workflows/dependencies.yml'
12-
pull_request:
13-
paths:
14-
- 'requirements*.txt'
15-
- 'pyproject.toml'
16-
- 'poetry.lock'
17-
- 'package.json'
18-
- 'package-lock.json'
19-
schedule:
20-
- cron: '0 0 * * 1' # Weekly on Monday
214
workflow_dispatch:
225

236
jobs:
@@ -65,29 +48,4 @@ jobs:
6548
else
6649
echo "Safety check skipped - tool or requirements not available"
6750
fi
68-
continue-on-error: true
69-
70-
- name: Generate dependency report
71-
if: always()
72-
run: |
73-
echo "## Dependency Report" > dependency-report.md
74-
echo "### Python Dependencies" >> dependency-report.md
75-
if [ -f "requirements.txt" ]; then
76-
echo "Found requirements.txt:" >> dependency-report.md
77-
echo "\`\`\`" >> dependency-report.md
78-
cat requirements.txt >> dependency-report.md
79-
echo "\`\`\`" >> dependency-report.md
80-
else
81-
echo "No requirements.txt found." >> dependency-report.md
82-
fi
83-
echo "### Status" >> dependency-report.md
84-
echo "- Requirements Check: ${{ job.steps.validate.outcome || 'SKIPPED' }}" >> dependency-report.md
85-
echo "- Security Check: ${{ job.steps.safety.outcome || 'SKIPPED' }}" >> dependency-report.md
86-
87-
- name: Upload dependency report
88-
if: always()
89-
uses: actions/upload-artifact@v3
90-
with:
91-
name: dependency-report
92-
path: dependency-report.md
93-
retention-days: 5
51+
continue-on-error: true

.github/workflows/deploy-monitor.yml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,4 @@ jobs:
6767
run: |
6868
echo "Running performance checks in ${{ inputs.environment }}..."
6969
# Placeholder for performance checks
70-
exit 0
71-
72-
- name: Generate Report
73-
run: |
74-
echo "## Deployment and Monitoring Report" > deploy-report.md
75-
echo "Environment: ${{ inputs.environment }}" >> deploy-report.md
76-
echo "Action: ${{ inputs.action }}" >> deploy-report.md
77-
echo "Status: Completed" >> deploy-report.md
78-
echo "Timestamp: $(date)" >> deploy-report.md
79-
80-
- name: Upload Report
81-
uses: actions/upload-artifact@v3
82-
with:
83-
name: deployment-report
84-
path: deploy-report.md
85-
retention-days: 5
70+
exit 0

.github/workflows/docs.yml

Lines changed: 9 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -30,78 +30,22 @@ jobs:
3030
uses: actions/setup-python@v4
3131
with:
3232
python-version: "3.10"
33-
cache: 'pip'
3433

35-
- name: Install dependencies
34+
- name: Install MkDocs and theme
3635
run: |
37-
python -m pip install --upgrade pip
38-
pip install mkdocs-material mkdocs-material-extensions pymdown-extensions
39-
40-
- name: Create default mkdocs config
41-
run: |
42-
if [ ! -f "mkdocs.yml" ]; then
43-
echo "Creating default mkdocs.yml"
44-
cat > mkdocs.yml << EOF
45-
site_name: Amega AI
46-
theme:
47-
name: material
48-
features:
49-
- navigation.tabs
50-
- navigation.sections
51-
- navigation.top
52-
- search.highlight
53-
markdown_extensions:
54-
- pymdownx.highlight:
55-
anchor_linenums: true
56-
- pymdownx.inlinehilite
57-
- pymdownx.snippets
58-
- pymdownx.superfences
59-
nav:
60-
- Home: index.md
61-
- About: about.md
62-
EOF
63-
fi
64-
65-
- name: Ensure docs structure
66-
run: |
67-
mkdir -p docs
68-
if [ ! -f "docs/index.md" ]; then
69-
echo "# Welcome to Amega AI" > docs/index.md
70-
echo "Documentation is under construction." >> docs/index.md
71-
fi
72-
if [ ! -f "docs/about.md" ]; then
73-
echo "# About Amega AI" > docs/about.md
74-
echo "More information coming soon." >> docs/about.md
75-
fi
36+
pip install mkdocs-material==9.6.14 \
37+
mkdocs-material-extensions==1.3.1 \
38+
pymdown-extensions==10.15
7639
7740
- name: Build documentation
78-
run: mkdocs build
41+
run: mkdocs build --strict
7942

8043
- name: Deploy to GitHub Pages
8144
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8247
run: |
8348
git config --global user.name "github-actions[bot]"
8449
git config --global user.email "github-actions[bot]@users.noreply.github.com"
85-
mkdocs gh-deploy --force
86-
87-
- name: Generate build report
88-
if: always()
89-
run: |
90-
echo "## Documentation Build Report" > docs-report.md
91-
echo "### Status" >> docs-report.md
92-
echo "- Config: $([ -f mkdocs.yml ] && echo 'FOUND' || echo 'CREATED')" >> docs-report.md
93-
echo "- Build: ${{ job.status }}" >> docs-report.md
94-
echo "### Files" >> docs-report.md
95-
echo "\`\`\`" >> docs-report.md
96-
ls -R site/ >> docs-report.md || echo "No site directory found" >> docs-report.md
97-
echo "\`\`\`" >> docs-report.md
98-
99-
- name: Upload documentation
100-
if: always()
101-
uses: actions/upload-artifact@v4
102-
with:
103-
name: documentation
104-
path: |
105-
site/
106-
docs-report.md
107-
retention-days: 5
50+
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}
51+
mkdocs gh-deploy --force

.github/workflows/gpt-check.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ jobs:
2323
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
2424
MODEL: "gpt-3.5-turbo"
2525
LANGUAGE: "en"
26+
REVIEW_COMMENT_PREFIX: "🤖 AI Review:"
27+
REVIEW_STYLE: "code-improvement"
28+
VERBOSE: true

.github/workflows/issue-pr.yml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
name: Issue and PR Management
32

43
on:
@@ -74,24 +73,3 @@ jobs:
7473
} catch (e) {
7574
console.log('Error checking PR title:', e.message);
7675
}
77-
- name: Generate Report
78-
if: always()
79-
run: |
80-
echo "## Triage Report" > triage-report.md
81-
echo "Event: ${{ github.event_name }}" >> triage-report.md
82-
echo "Action: ${{ github.event.action }}" >> triage-report.md
83-
if [ "${{ github.event_name }}" = "issues" ]; then
84-
echo "Issue: #${{ github.event.issue.number }}" >> triage-report.md
85-
echo "Title: ${{ github.event.issue.title }}" >> triage-report.md
86-
elif [ "${{ github.event_name }}" = "pull_request" ]; then
87-
echo "PR: #${{ github.event.pull_request.number }}" >> triage-report.md
88-
echo "Title: ${{ github.event.pull_request.title }}" >> triage-report.md
89-
fi
90-
echo "Status: Completed" >> triage-report.md
91-
- name: Upload Report
92-
if: always()
93-
uses: actions/upload-artifact@v4
94-
with:
95-
name: triage-report
96-
path: triage-report.md
97-
retention-days: 5

.github/workflows/performance.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ jobs:
8585
runs-on: ubuntu-latest
8686
needs: performance
8787
steps:
88-
- uses: actions/checkout@v3
88+
- uses: actions/checkout@v4
8989

9090
- name: Set up Python
91-
uses: actions/setup-python@v4
91+
uses: actions/setup-python@v5
9292
with:
9393
python-version: '3.10'
9494

docs/CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../CONTRIBUTING.md

0 commit comments

Comments
 (0)