-
Notifications
You must be signed in to change notification settings - Fork 0
ci: add reusable phenotype workflows #14
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
Open
KooshaPari
wants to merge
3
commits into
main
Choose a base branch
from
chore/add-reusable-workflows
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+502
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| name: Legacy Tooling Gate (WARN Mode) | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, master, develop] | ||
| pull_request: | ||
| branches: [main, master] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| legacy-tooling-scan: | ||
| name: Legacy Tooling Anti-Pattern Scan | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| security-events: write | ||
| pull-requests: write | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Checkout phenotype/repos for shared tools | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: kooshapari/phenotype | ||
| path: phenotype-repos | ||
| sparse-checkout: tooling/legacy-enforcement | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.12' | ||
|
|
||
| - name: Install dependencies | ||
| run: pip install pyyaml | ||
|
|
||
| - name: Run Legacy Tooling Scanner (WARN Mode) | ||
| run: | | ||
| python3 phenotype-repos/tooling/legacy-enforcement/scanner/legacy_tooling_scanner.py \ | ||
| --repo-root . \ | ||
| --policy phenotype-repos/tooling/legacy-enforcement/policy/rules.yaml \ | ||
| --output-json legacy_tooling_report.json \ | ||
| --output-md legacy_tooling_report.md \ | ||
| --report-only | ||
| continue-on-error: true | ||
|
|
||
| - name: Upload scan report (JSON) | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: legacy-tooling-report-json | ||
| path: legacy_tooling_report.json | ||
| retention-days: 30 | ||
|
|
||
| - name: Upload scan report (Markdown) | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: legacy-tooling-report-md | ||
| path: legacy_tooling_report.md | ||
| retention-days: 30 | ||
|
|
||
| - name: Comment PR with findings | ||
| if: github.event_name == 'pull_request' | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| const fs = require('fs'); | ||
| let report = '**Legacy Tooling Scan Report**\n\n'; | ||
|
|
||
| try { | ||
| const data = JSON.parse(fs.readFileSync('legacy_tooling_report.json', 'utf8')); | ||
| const totals = data.totals || {}; | ||
|
|
||
| report += `| Severity | Count |\n|----------|-------|\n`; | ||
| report += `| Critical | ${totals.critical || 0} |\n`; | ||
| report += `| High | ${totals.high || 0} |\n`; | ||
| report += `| Medium | ${totals.medium || 0} |\n`; | ||
| report += `| Low | ${totals.low || 0} |\n\n`; | ||
|
|
||
| const findings = data.findings || []; | ||
| if (findings.length > 0) { | ||
| report += '**Top Violations:**\n'; | ||
| findings.slice(0, 5).forEach(f => { | ||
| report += `- [${f.severity.toUpperCase()}] ${f.rule_id}: ${f.file}:${f.line}\n`; | ||
| }); | ||
| if (findings.length > 5) { | ||
| report += `- ... and ${findings.length - 5} more\n`; | ||
| } | ||
| } else { | ||
| report += 'No violations detected.\n'; | ||
| } | ||
|
|
||
| report += '\n*This is a WARN-mode scan. Fix before strict enforcement begins.*'; | ||
| } catch (e) { | ||
| report += 'Could not parse scan results.'; | ||
| } | ||
|
|
||
| github.rest.issues.createComment({ | ||
| issue_number: context.issue.number, | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| body: report | ||
| }); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| # BytePort — PLAN.md | ||
|
|
||
| ## Implementation Roadmap | ||
|
|
||
| ### Phase 1: Foundation (Weeks 1-2) | ||
|
|
||
| | Task | Description | Deliverable | | ||
| |------|-------------|-------------| | ||
| | P1.1 | Go project setup | Module structure, build scripts | | ||
| | P1.2 | NVMS parser | Manifest validation, transformation | | ||
| | P1.3 | AWS SDK setup | Credentials, base client | | ||
| | P1.4 | Frontend shell | UI framework, routing | | ||
|
|
||
| ### Phase 2: NanoVMS Core (Weeks 3-4) | ||
|
|
||
| | Task | Description | Deliverable | | ||
| |------|-------------|-------------| | ||
| | P2.1 | SpinCLI integration | VM creation, management | | ||
| | P2.2 | MicroVM images | Build pipeline, base images | | ||
| | P2.3 | Networking | VPC, security groups | | ||
| | P2.4 | VM lifecycle | Start, stop, health checks | | ||
|
|
||
| ### Phase 3: Deploy Engine (Weeks 5-6) | ||
|
|
||
| | Task | Description | Deliverable | | ||
| |------|-------------|-------------| | ||
| | P3.1 | Git integration | Repo clone, branch checkout | | ||
| | P3.2 | Service discovery | Multi-service apps | | ||
| | P3.3 | Environment config | Env var injection | | ||
| | P3.4 | Deploy pipeline | End-to-end flow | | ||
|
|
||
| ### Phase 4: Portfolio Generation (Weeks 7-8) | ||
|
|
||
| | Task | Description | Deliverable | | ||
| |------|-------------|-------------| | ||
| | P4.1 | LLM integration | OpenAI + LLaMA backends | | ||
| | P4.2 | Screenshot capture | Puppeteer/Playwright | | ||
| | P4.3 | Template system | Page generation | | ||
| | P4.4 | Portfolio hosting | S3 + CloudFront | | ||
|
|
||
| ### Phase 5: Polish (Weeks 9-10) | ||
|
|
||
| | Task | Description | Deliverable | | ||
| |------|-------------|-------------| | ||
| | P5.1 | UI completion | Dashboard, deploy wizard | | ||
| | P5.2 | Error handling | Retry, rollback, alerts | | ||
| | P5.3 | Testing | Unit, integration tests | | ||
| | P5.4 | Documentation | User guide, API docs | | ||
|
|
||
| --- | ||
|
|
||
| ## Resources | ||
|
|
||
| | Role | Allocation | | ||
| |------|------------| | ||
| | Backend Engineer | 2 FTE | | ||
| | Frontend Engineer | 1 FTE | | ||
| | DevOps Engineer | 0.5 FTE | | ||
|
|
||
| --- | ||
|
|
||
| ## Success Criteria | ||
|
|
||
| - [ ] Deploy from GitHub in <5 minutes | ||
| - [ ] Multi-service app support | ||
| - [ ] Auto-generated portfolio pages | ||
| - [ ] 99.9% deployed app uptime | ||
| - [ ] Zero-downtime redeploys |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
WARNING: Unpinned dependency -
pip install pyyamlhas no version constraint. This could cause CI failures if pyyaml releases breaking changes. Consider pinning to a specific version (e.g.,pyyaml>=6.0) to ensure reproducible builds.