Skip to content

Commit b6eb4b4

Browse files
initial commit
0 parents  commit b6eb4b4

File tree

137 files changed

+14840
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+14840
-0
lines changed

.dockerignore

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Git
2+
.git
3+
.gitignore
4+
.gitattributes
5+
6+
# IDE and Editor
7+
.vs
8+
.vscode
9+
.idea
10+
*.suo
11+
*.user
12+
*.userosscache
13+
*.sln.docstates
14+
15+
# Build outputs - CRITICAL: exclude Windows obj/bin folders
16+
**/bin
17+
**/obj
18+
**/out
19+
**/publish
20+
21+
# NuGet
22+
**/packages
23+
24+
# Test results
25+
**/TestResults
26+
**/coverage
27+
28+
# Documentation
29+
docs/
30+
*.md
31+
!README.md
32+
33+
# Samples and output
34+
samples/
35+
**/Output/
36+
**/results/
37+
output/
38+
39+
# Logs
40+
*.log
41+
logs/
42+
43+
# Environment files
44+
*.env
45+
*.local
46+
47+
# OS files
48+
.DS_Store
49+
Thumbs.db
50+
51+
# Cursor/VSCode plans
52+
.cursor/
53+
54+
# Temporary files
55+
*.tmp
56+
*.temp
57+
*.swp
58+
*~

.github/workflows/ci.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: CI/CD Pipeline
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
inputs:
10+
tutorial_url:
11+
description: 'Tutorial URL to validate'
12+
required: true
13+
default: 'https://abp.io/docs/latest/tutorials/book-store?UI=MVC&DB=EF'
14+
persona:
15+
description: 'Developer persona'
16+
required: false
17+
default: 'senior'
18+
type: choice
19+
options: [junior, mid, senior]
20+
21+
jobs:
22+
build-and-test:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v4
27+
28+
- name: Setup .NET 10
29+
uses: actions/setup-dotnet@v4
30+
with:
31+
dotnet-version: '10.0.x'
32+
33+
- name: Restore dependencies
34+
run: dotnet restore
35+
36+
- name: Build solution
37+
run: dotnet build --configuration Release --no-restore
38+
39+
- name: Run unit tests
40+
run: dotnet test --configuration Release --no-build --verbosity normal
41+
42+
validate-tutorial:
43+
needs: build-and-test
44+
runs-on: ubuntu-latest
45+
if: github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/main'
46+
47+
steps:
48+
- name: Checkout code
49+
uses: actions/checkout@v4
50+
51+
- name: Setup .NET 10
52+
uses: actions/setup-dotnet@v4
53+
with:
54+
dotnet-version: '10.0.x'
55+
56+
- name: Set up Docker
57+
run: |
58+
sudo systemctl start docker
59+
sudo systemctl enable docker
60+
61+
- name: Install ABP CLI
62+
run: dotnet tool install -g Volo.Abp.Studio.Cli
63+
64+
- name: Create output directory
65+
run: mkdir -p output
66+
67+
- name: Run validation
68+
env:
69+
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
70+
AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }}
71+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
72+
run: |
73+
dotnet run --project src/Validator.Orchestrator -- run \
74+
--url "${{ github.event.inputs.tutorial_url || 'https://abp.io/docs/latest/tutorials/book-store?UI=MVC&DB=EF' }}" \
75+
--persona "${{ github.event.inputs.persona || 'senior' }}" \
76+
--output ./output
77+
78+
- name: Upload results
79+
uses: actions/upload-artifact@v4
80+
with:
81+
name: validation-results
82+
path: output/
83+
84+
- name: Comment PR with results
85+
if: github.event_name == 'pull_request'
86+
uses: actions/github-script@v7
87+
with:
88+
script: |
89+
const fs = require('fs');
90+
const path = './output/summary.json';
91+
92+
if (fs.existsSync(path)) {
93+
const summary = JSON.parse(fs.readFileSync(path, 'utf8'));
94+
const status = summary.OverallStatus === 'Passed' ? '✅' : '❌';
95+
96+
github.rest.issues.createComment({
97+
issue_number: context.issue.number,
98+
owner: context.repo.owner,
99+
repo: context.repo.repo,
100+
body: `## Tutorial Validation Results ${status}\n\n**Tutorial:** ${summary.TutorialName}\n**Status:** ${summary.OverallStatus}\n**Duration:** ${summary.Duration}\n\nSee artifacts for detailed results.`
101+
});
102+
}

.github/workflows/docker.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
tags: [ 'v*.*.*' ]
6+
branches: [ main ]
7+
workflow_dispatch:
8+
9+
jobs:
10+
build-and-push:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Docker Buildx
17+
uses: docker/setup-buildx-action@v3
18+
19+
- name: Login to Container Registry
20+
uses: docker/login-action@v3
21+
with:
22+
registry: ${{ secrets.REGISTRY_URL }}
23+
username: ${{ secrets.REGISTRY_USERNAME }}
24+
password: ${{ secrets.REGISTRY_PASSWORD }}
25+
26+
- name: Extract metadata
27+
id: meta
28+
uses: docker/metadata-action@v5
29+
with:
30+
images: ${{ secrets.REGISTRY_URL }}/tutorial-validator
31+
tags: |
32+
type=ref,event=branch
33+
type=ref,event=pr
34+
type=semver,pattern={{version}}
35+
type=semver,pattern={{major}}.{{minor}}
36+
type=semver,pattern={{major}}
37+
type=raw,value=latest,enable={{is_default_branch}}
38+
39+
- name: Build and push
40+
uses: docker/build-push-action@v5
41+
with:
42+
context: .
43+
file: ./docker/Dockerfile
44+
push: true
45+
tags: ${{ steps.meta.outputs.tags }}
46+
labels: ${{ steps.meta.outputs.labels }}
47+
cache-from: type=gha
48+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)