Skip to content

Commit e11b916

Browse files
2 parents 4f183a1 + e03e3ae commit e11b916

69 files changed

Lines changed: 2840 additions & 2302 deletions

Some content is hidden

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

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ updates:
3535
# npm dependencies - grouped
3636
- package-ecosystem: "npm"
3737
directories:
38-
- "/src/app/frontend"
39-
- "/src/app/frontend-server"
38+
- "/src/App"
39+
- "/src/App/server"
4040
schedule:
4141
interval: "monthly"
4242
target-branch: "dependabotchanges"

.github/workflows/docker-build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ on:
88
- demo
99
paths:
1010
- 'src/backend/**'
11-
- 'src/app/frontend/**'
12-
- 'src/app/frontend-server/**'
11+
- 'src/App/src/**'
12+
- 'src/App/server/**'
1313
- '.github/workflows/docker-build.yml'
1414
pull_request:
1515
types:
@@ -23,8 +23,8 @@ on:
2323
- demo
2424
paths:
2525
- 'src/backend/**'
26-
- 'src/app/frontend/**'
27-
- 'src/app/frontend-server/**'
26+
- 'src/App/src/**'
27+
- 'src/App/server/**'
2828
- '.github/workflows/docker-build.yml'
2929
workflow_dispatch:
3030

@@ -88,8 +88,8 @@ jobs:
8888
- name: Build and Push Docker Image for Frontend Server
8989
uses: docker/build-push-action@v7
9090
with:
91-
context: ./src/app
92-
file: ./src/app/WebApp.Dockerfile
91+
context: ./src/App
92+
file: ./src/App/WebApp.Dockerfile
9393
push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'dependabotchanges' }}
9494
tags: |
9595
${{ secrets.ACR_LOGIN_SERVER || 'acrlogin.azurecr.io' }}/content-gen-app:${{ steps.determine_tag.outputs.tagname }}

.github/workflows/job-docker-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ jobs:
6565
env:
6666
DOCKER_BUILD_SUMMARY: false
6767
with:
68-
context: ./src/app
69-
file: ./src/app/WebApp.Dockerfile
68+
context: ./src/App
69+
file: ./src/App/WebApp.Dockerfile
7070
push: true
7171
tags: |
7272
${{ secrets.ACR_TEST_LOGIN_SERVER }}/content-gen-app:${{ steps.generate_docker_tag.outputs.AZURE_ENV_IMAGE_TAG }}

.github/workflows/test.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ on:
2828
permissions:
2929
contents: read
3030
actions: read
31+
pull-requests: write
3132

3233
concurrency:
3334
group: test-${{ github.ref }}
@@ -69,7 +70,19 @@ jobs:
6970
- name: Run Backend Tests with Coverage
7071
if: env.skip_backend_tests == 'false'
7172
run: |
72-
pytest --cov=. --cov-report=term-missing --cov-report=xml ./src/tests
73+
pytest --cov=. --cov-report=term-missing --cov-report=xml --junitxml=pytest.xml ./src/tests
74+
75+
- name: Pytest Coverage Comment
76+
if: |
77+
always() &&
78+
github.event_name == 'pull_request' &&
79+
github.event.pull_request.head.repo.fork == false &&
80+
env.skip_backend_tests == 'false'
81+
uses: MishaKav/pytest-coverage-comment@26f986d2599c288bb62f623d29c2da98609e9cd4 # v1.6.0
82+
with:
83+
pytest-xml-coverage-path: coverage.xml
84+
junitxml-path: pytest.xml
85+
report-only-changed-files: true
7386

7487
- name: Skip Backend Tests
7588
if: env.skip_backend_tests == 'true'

.gitignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ eggs/
3636
*.swo
3737

3838
# Node
39-
/src/app/frontend/node_modules/
40-
/src/app/frontend-server/node_modules/
41-
/src/app/frontend-server/static/
42-
/src/app/frontend-server/*.zip
39+
/src/App/node_modules/
40+
/src/App/server/node_modules/
41+
/src/App/server/static/
42+
/src/App/server/*.zip
4343
node_modules/
4444

4545
# Build output
46-
/src/app/static/
47-
/src/app/frontend/dist/
46+
/src/App/static/
47+
/src/App/dist/
4848

4949
# Logs
5050
*.log

azure_custom.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ infra:
1111

1212
services:
1313
frontend:
14-
project: ./src/app/frontend-server
14+
project: ./src/App/server
1515
language: js
1616
host: appservice
1717
dist: ./dist

docs/AZD_DEPLOYMENT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ Error: az acr build failed
239239
**Solution**: Check the Dockerfile and ensure all required files are present:
240240
```bash
241241
# Manual build for debugging
242-
cd src/app
242+
cd src/App
243243
docker build -f WebApp.Dockerfile -t content-gen-app:test .
244244
```
245245

@@ -251,7 +251,7 @@ Error: az webapp deploy failed
251251

252252
**Solution**: Ensure the frontend builds successfully:
253253
```bash
254-
cd src/app/frontend
254+
cd src/App
255255
npm install
256256
npm run build
257257
```

docs/TECHNICAL_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ pip install -r requirements.txt
142142
python app.py
143143

144144
# Frontend
145-
cd src/app/frontend
145+
cd src/App
146146
npm install
147147
npm run dev
148148
```

infra/scripts/package_frontend.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Package frontend for App Service deployment
22
# This script is called by AZD during prepackage hook
3-
# Working directory is ./src/app/frontend-server (project directory)
3+
# Working directory is ./src/App/server (project directory)
44

55
$ErrorActionPreference = 'Stop'
66

77
Write-Host "Building React frontend..." -ForegroundColor Cyan
88

99
# Build React frontend (one level up)
10-
Push-Location ../frontend
10+
Push-Location ..
1111
npm ci --loglevel=error
1212
if ($LASTEXITCODE -ne 0) { throw "npm ci failed with exit code $LASTEXITCODE" }
13-
npm run build -- --outDir ../frontend-server/static
13+
npm run build -- --outDir ./server/static
1414
if ($LASTEXITCODE -ne 0) { throw "npm run build failed with exit code $LASTEXITCODE" }
1515
Pop-Location
1616

infra/scripts/package_frontend.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ set -euo pipefail
33

44
# Package frontend for App Service deployment
55
# This script is called by AZD during prepackage hook
6-
# Working directory is ./src/app/frontend-server (project directory)
6+
# Working directory is ./src/App/server (project directory)
77

88
echo "Building React frontend..."
99

1010
# Build React frontend (one level up)
11-
cd ../frontend
11+
cd ..
1212
npm ci --loglevel=error
13-
npm run build -- --outDir ../frontend-server/static
14-
cd ../frontend-server
13+
npm run build -- --outDir ./server/static
14+
cd ./server
1515

1616
echo "Packaging frontend server..."
1717

0 commit comments

Comments
 (0)