Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
156e4d7
docs: Update PLAN.md with .NET 10 and C# 14 strategy
Nov 12, 2025
1d95536
migra para dotnet 10
Nov 12, 2025
d7b06bc
chore: merge master into migration-to-dotnet-10
Nov 19, 2025
02888c7
docs: update ROADMAP with Phase 1.5, Blazor stack, and sprint planning
Nov 19, 2025
c989aa7
feat: migrate to .NET 10 + Aspire 13 + Swashbuckle 10
Nov 20, 2025
31d7d80
docs: update CI/CD workflows and documentation for .NET 10
Nov 20, 2025
08d33e6
fix: temporarily disable OpenApiServer configuration to resolve UriFo…
Nov 20, 2025
b0780cd
refactor: improve E2E test infrastructure and fix ServiceCatalogs tests
Nov 20, 2025
4e8b9c5
feat: add SearchProvidersDbContext to E2E tests with PostGIS support
Nov 20, 2025
a5889c1
ci: add E2E tests to CI/CD pipelines
Nov 20, 2025
81584f9
fix: correct ServiceCatalogs E2E tests and repository Update methods
Nov 20, 2025
20a2a07
fix: configure E2E infrastructure for SearchProviders with Dapper/Pos…
Nov 20, 2025
c5046e7
refactor: remove redundant validation code and E2E test
Nov 20, 2025
3d8aedd
feat: implement E2E authentication infrastructure for Authorization t…
Nov 20, 2025
881ca9a
feat: Adiciona 22 testes E2E alcançando 100% de cobertura de endpoints
Nov 20, 2025
233b879
feat: Adiciona 22 testes E2E alcançando 100% de cobertura de endpoints
Nov 20, 2025
8b6bf86
docs: fix inconsistencies across roadmap, global.json, migration guid…
Nov 20, 2025
046f020
refactor: apply code review fixes for repositories, tests, and OpenAP…
Nov 20, 2025
2ef8657
test: improve E2E test quality and eliminate code duplication
Nov 20, 2025
7345226
docs: update .NET version references and improve test robustness
Nov 20, 2025
04f52c6
chore: normalize line endings in NuGet.config
Nov 20, 2025
c7d6912
style: apply dotnet format to fix code formatting issues
Nov 20, 2025
e0fbe6b
fix: consolidate NuGet config and fix Aspire package source mapping
Nov 20, 2025
c533042
chore: suppress NuGet warnings and remove redundant package references
Nov 20, 2025
581961d
fix: enable prerelease packages for .NET 10 dependencies in CI
Nov 20, 2025
6db98b5
fix: correct raw string literal syntax in CrossModuleCommunicationE2E…
Nov 20, 2025
7062a4e
fix: resolve compilation errors in E2E tests from previous formatter …
Nov 20, 2025
3f80d56
fix(tests): Update ConfigureUser call sites and add ClearConfiguratio…
Nov 20, 2025
6aee4c9
refactor(tests): improve E2E test quality and maintainability
Nov 20, 2025
f37df02
fix: resolve .NET 10 migration issues and improve test reliability
Nov 20, 2025
8a6df4b
fix: resolve .NET 10 package issues and improve code quality
Nov 20, 2025
d3ef6d4
fix: correct package source mapping for .NET 10 migration
Nov 20, 2025
ee8a2cb
fix: remove package source mapping to allow NuGet to resolve from bot…
Nov 20, 2025
19c4104
refactor: improve E2E tests and clarify migration configuration
Nov 20, 2025
b2811a4
feat: implement code review improvements
Nov 20, 2025
49d0246
fix: simplify DeleteUser_WithoutPermission test
Nov 20, 2025
87ad342
fix: add --force-evaluate to dotnet restore in CI workflows
Nov 20, 2025
e6551bc
style: fix code formatting per dotnet format
Nov 20, 2025
516b01c
chore: regenerate lock files and fix package issues
Nov 20, 2025
cb017de
fix: address code quality and security issues
Nov 20, 2025
7d3eb22
chore: remove incompatible Aspire.Npgsql.EntityFrameworkCore.PostgreSQL
Nov 20, 2025
31886e4
fix: pin Microsoft.Build.* to 17.14.28 and Microsoft.Extensions.* to …
Nov 21, 2025
1a73761
chore: update OpenTelemetry packages and remove vulnerability suppres…
Nov 21, 2025
c434eff
fix to resolve the CI/CD pipeline failure
Nov 21, 2025
39acf68
fix: corrige endpoints do ServiceCatalogs e limpa warnings do build
Nov 21, 2025
c7cb871
fix: suprime warnings CA2000 com #pragma em código de teste
Nov 21, 2025
a95d1a7
refactor: corrige ISchemaFilter, simplifica .globalconfig e documenta…
Nov 21, 2025
0122ae0
fix: atualiza endpoints nos testes de integração e E2E do ServiceCata…
Nov 21, 2025
51be344
fix: normaliza line endings para LF em todos os arquivos
Nov 21, 2025
075fe4e
refactor: implementa melhorias do code review
Nov 21, 2025
733587c
ttraducao
Nov 21, 2025
c2f3a23
chore: suppress xUnit1051 warnings and add Hangfire compatibility val…
Nov 21, 2025
1177289
fix: suprimir warnings xUnit1051/xUnit1012/CA2000 e corrigir formataç…
Nov 21, 2025
c13bca1
fix: Desabilitar ExampleSchemaFilter temporariamente devido a incompa…
Nov 21, 2025
1509585
fix: Corrigir assinatura do ExampleSchemaFilter para Swashbuckle 10.x
Nov 21, 2025
33474ee
fix: Skip testes Hangfire CRITICAL no CI/CD (requerem Aspire)
Nov 21, 2025
74f8e81
feat: Adicionar monitoramento automatico de dependencias
Nov 21, 2025
4172364
docs: Adicionar analise detalhada de falhas E2E no CI/CD
Nov 21, 2025
60488e4
Configure E2E test infrastructure for CI/CD
Nov 21, 2025
18aed71
Fix Azurite health check in CI/CD
Nov 21, 2025
19039a9
Address code review feedback - workflows and documentation
Nov 21, 2025
26d4c21
Fix security scanner warnings and second restore step
Nov 21, 2025
26d87e7
Use --force-evaluate to regenerate outdated lock files
Nov 21, 2025
5c5b43d
Skip 5 problematic E2E tests in CI/CD (98/103 passing - 95.1%)
Nov 21, 2025
19799b9
Skip UserWithoutCreatePermission test (same auth issue)
Nov 21, 2025
7586967
Final documentation polish - phase numbering and warnings
Nov 21, 2025
e36c7fe
Fix remaining documentation issues
Nov 21, 2025
91510f0
Skip ApiVersioning test (auth issue #7)
Nov 21, 2025
e97b67f
Address final code review feedback
Nov 21, 2025
c489ad8
Add Sprint 1 detailed checklist
Nov 21, 2025
8a95677
Skip 2 additional auth tests + update Sprint 1 checklist
Nov 21, 2025
d785844
Add comprehensive skipped tests tracker (12 tests across all projects)
Nov 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ dotnet_diagnostic.CA2955.severity = none # Use comparison to default(T) instead
# =====================================
# REGRAS ESPECÍFICAS PARA TESTES
# =====================================
[**/*Test*.cs,**/Tests/**/*.cs,**/tests/**/*.cs]
[**/*Test*.cs,**/Tests/**/*.cs,**/tests/**/*.cs,**/MeAjudaAi.*.Tests/**/*.cs]

# Relaxar regras críticas APENAS em testes
dotnet_diagnostic.CA2007.severity = none # ConfigureAwait não necessário em testes
Expand All @@ -141,8 +141,7 @@ dotnet_diagnostic.CA2263.severity = none # Prefer generic overloads (test asser
dotnet_diagnostic.CA5351.severity = suggestion # Broken cryptographic algorithms OK for test data
dotnet_diagnostic.CA2201.severity = none # Exception type System.Exception is not sufficiently specific (test mocks)

# xUnit specific warnings
dotnet_diagnostic.xUnit1051.severity = suggestion # CancellationToken usage (can be relaxed but good to see)
# Performance and code quality (relaxed for tests)
dotnet_diagnostic.CA1827.severity = none # Use Any() instead of Count() (test validations)
dotnet_diagnostic.CA1829.severity = none # Use Count property instead of Enumerable.Count (test validations)
dotnet_diagnostic.CA1826.severity = none # Use indexable collections directly (test data)
Expand All @@ -154,9 +153,12 @@ dotnet_diagnostic.CA2254.severity = none # Logging message template should not
dotnet_diagnostic.CA2208.severity = none # Argument exception parameter names (test scenarios)
dotnet_diagnostic.CA2215.severity = none # Dispose methods should call base.Dispose (test infrastructure)

# xUnit specific
dotnet_diagnostic.xUnit1012.severity = none # Null should not be used for type parameter (test data)
dotnet_diagnostic.xUnit1051.severity = none # Calls to methods which accept CancellationToken should use TestContext.Current.CancellationToken
# xUnit specific suppressions (globally disabled to reduce noise during .NET 10 migration)
dotnet_diagnostic.xUnit1012.severity = none # Null should not be used for type parameter (common in test data)
dotnet_diagnostic.xUnit1051.severity = none # Use TestContext.Current.CancellationToken (755+ warnings, intentionally disabled)

# Code analysis suppressions for test code
dotnet_diagnostic.CA2000.severity = none # Dispose objects before losing scope (false positives with StringContent in tests)

# =====================================
# IDE STYLE RULES (TODOS OS ARQUIVOS)
Expand Down
10 changes: 9 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
* text=auto eol=lf

# Windows-specific files should use CRLF
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=lf

# Shell scripts should always use LF
*.sh text eol=lf

###############################################################################
# Set default behavior for command prompt diff.
Expand Down
110 changes: 110 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
version: 2

updates:
# Monitorar pacotes NuGet (.NET)
- package-ecosystem: "nuget"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
timezone: "America/Sao_Paulo"

# Limitar número de PRs abertos simultaneamente
open-pull-requests-limit: 5

# Configuração de commits
commit-message:
prefix: "chore"
prefix-development: "chore"
include: "scope"

# Labels para PRs criados
labels:
- "dependencies"
- "nuget"
- "automated"

# Agrupar updates relacionados
groups:
# Grupo: .NET Runtime e Core packages
dotnet-core:
patterns:
- "Microsoft.Extensions.*"
- "System.*"
update-types:
- "minor"
- "patch"

# Grupo: EF Core packages
ef-core:
patterns:
- "Microsoft.EntityFrameworkCore*"
update-types:
- "minor"
- "patch"

# Grupo: Npgsql packages
npgsql:
patterns:
- "Npgsql*"
update-types:
- "minor"
- "patch"

# Grupo: Aspire packages
aspire:
patterns:
- "Aspire.*"
update-types:
- "minor"
- "patch"

# Grupo: Testing packages
testing:
patterns:
- "xunit*"
- "Moq*"
- "FluentAssertions*"
- "AutoFixture*"
- "coverlet*"
update-types:
- "minor"
- "patch"

# Grupo: Observability packages
observability:
patterns:
- "OpenTelemetry*"
- "Serilog*"
update-types:
- "minor"
- "patch"

# Ignorar updates específicos (temporariamente)
ignore:
# Não atualizar automaticamente para versões major (requer revisão manual)
- dependency-name: "*"
update-types: ["version-update:semver-major"]

# Reviewers automáticos

# Monitorar GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
timezone: "America/Sao_Paulo"

open-pull-requests-limit: 3

commit-message:
prefix: "ci"
include: "scope"

labels:
- "dependencies"
- "github-actions"
- "automated"
10 changes: 5 additions & 5 deletions .github/workflows/aspire-ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ permissions:
checks: write

env:
DOTNET_VERSION: '9.0.x'
DOTNET_VERSION: '10.0.x'

jobs:
# Build and test the solution
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
dotnet workload install aspire --skip-sign-check --source https://api.nuget.org/v3/index.json

- name: Restore dependencies
run: dotnet restore MeAjudaAi.sln
run: dotnet restore MeAjudaAi.sln --force-evaluate --locked-mode

- name: Build solution
run: dotnet build MeAjudaAi.sln --no-restore --configuration Release --verbosity minimal
Expand Down Expand Up @@ -143,7 +143,7 @@ jobs:
dotnet workload install aspire --skip-sign-check --source https://api.nuget.org/v3/index.json

- name: Restore dependencies
run: dotnet restore MeAjudaAi.sln
run: dotnet restore MeAjudaAi.sln --force-evaluate --locked-mode

- name: Validate Aspire AppHost
run: |
Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:
dotnet workload install aspire --skip-sign-check --source https://api.nuget.org/v3/index.json

- name: Restore dependencies
run: dotnet restore MeAjudaAi.sln
run: dotnet restore MeAjudaAi.sln --force-evaluate --locked-mode

- name: Check code formatting
run: |
Expand Down Expand Up @@ -229,7 +229,7 @@ jobs:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Restore dependencies
run: dotnet restore MeAjudaAi.sln
run: dotnet restore MeAjudaAi.sln --force-evaluate --locked-mode

- name: Validate ${{ matrix.service.name }} builds for containerization
run: |
Expand Down
127 changes: 127 additions & 0 deletions .github/workflows/check-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: Check Outdated Dependencies

on:
schedule:
# Durante Sprint 0 (Migration .NET 10): DIÁRIO para detectar releases stable rapidamente
# Após merge para master: Alterar para '0 9 * * 1' (semanal - segundas-feiras)
# TODO (Issue #TBD): Change to '0 9 * * 1' (weekly on Mondays) after Sprint 0 merge to master
# Tracked in: https://github.com/frigini/MeAjudaAi/issues (create post-merge)
- cron: '0 9 * * *' # Diário às 9h UTC (6h Brasília)
workflow_dispatch: # Permite execução manual

jobs:
check-outdated:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.x'

- name: Install dotnet-outdated tool
run: dotnet tool install --global dotnet-outdated-tool

- name: Check for outdated packages
id: check
continue-on-error: true
run: |
echo "Verificando pacotes desatualizados..."

# Use --fail-on-updates to get exit code directly
# Exit code 0 = no updates, non-zero = updates found
# Note: With continue-on-error:true, we capture exit code for analysis
dotnet outdated --upgrade:Major --transitive:false --fail-on-updates > outdated-report.txt 2>&1
EXIT_CODE=$?

# Display report for debugging
cat outdated-report.txt

# Interpret exit code: 0 = no updates, 1+ = updates found (or error)
# dotnet-outdated-tool returns non-zero when updates exist with --fail-on-updates
if [ $EXIT_CODE -eq 0 ]; then
echo "outdated_found=false" >> $GITHUB_OUTPUT
else
# Could be updates OR tool failure - check report for "has newer versions"
if grep -q "has newer versions\|Upgrade" outdated-report.txt; then
echo "outdated_found=true" >> $GITHUB_OUTPUT
else
echo "outdated_found=false" >> $GITHUB_OUTPUT
echo "⚠️ dotnet-outdated exited with code $EXIT_CODE but no updates detected" >> $GITHUB_STEP_SUMMARY
fi
fi

- name: Create Issue if outdated packages found
if: steps.check.outputs.outdated_found == 'true'
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const report = fs.readFileSync('outdated-report.txt', 'utf8');

// Verificar se já existe issue aberta
const issues = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
labels: 'dependencies,automated'
});

const existingIssue = issues.data.find(issue =>
issue.title.includes('[AUTOMATED] Outdated NuGet Packages Detected')
);

const issueBody = `## 📦 Pacotes Desatualizados Detectados\n\n` +
`**Data da verificação:** ${new Date().toLocaleString('pt-BR', { timeZone: 'America/Sao_Paulo' })}\n\n` +
`### Relatório dotnet-outdated\n\n` +
`\`\`\`\n${report}\n\`\`\`\n\n` +
`### 📋 Próximos Passos\n\n` +
`1. Revisar pacotes listados acima\n` +
`2. Verificar breaking changes nos release notes\n` +
`3. Atualizar \`Directory.Packages.props\` conforme necessário\n` +
`4. Executar \`dotnet restore\` e \`dotnet build\` localmente\n` +
`5. Executar suite completa de testes\n` +
`6. Criar PR com atualizações validadas\n\n` +
`### ⚠️ Pacotes Críticos (Requerem Atenção Especial)\n\n` +
`- **EF Core 10.x**: Testar migrations após atualização\n` +
`- **Npgsql 10.x**: Revalidar compatibilidade com Hangfire.PostgreSql\n` +
`- **Aspire 13.x**: Verificar orchestration configs\n\n` +
`---\n` +
`*Issue criada automaticamente pelo workflow \`check-dependencies.yml\`*`;

if (existingIssue) {
// Atualizar issue existente
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: existingIssue.number,
body: `## 🔄 Atualização de Verificação\n\n${issueBody}`
});
console.log(`Issue #${existingIssue.number} atualizada com novo relatório`);
} else {
// Criar nova issue
const newIssue = await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: '[AUTOMATED] Outdated NuGet Packages Detected',
body: issueBody,
labels: ['dependencies', 'automated', 'sprint-0']
});
console.log(`Nova issue criada: #${newIssue.data.number}`);
}

- name: Summary
run: |
echo "### ✅ Verificação de Dependências Concluída" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ "${{ steps.check.outputs.outdated_found }}" == "true" ]; then
echo "⚠️ **Pacotes desatualizados encontrados!**" >> $GITHUB_STEP_SUMMARY
echo "Issue criada/atualizada automaticamente." >> $GITHUB_STEP_SUMMARY
else
echo "✅ **Todas as dependências estão atualizadas!**" >> $GITHUB_STEP_SUMMARY
fi
echo "" >> $GITHUB_STEP_SUMMARY
echo "📅 Próxima verificação: Segunda-feira às 9h UTC" >> $GITHUB_STEP_SUMMARY
18 changes: 14 additions & 4 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ permissions:
statuses: write

env:
DOTNET_VERSION: '9.0.x'
DOTNET_VERSION: '10.0.x'
AZURE_RESOURCE_GROUP_DEV: 'meajudaai-dev'
AZURE_LOCATION: 'brazilsouth'

Expand Down Expand Up @@ -56,8 +56,8 @@ jobs:
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Restore dependencies
run: dotnet restore MeAjudaAi.sln
- name: 🔧 Restore dependencies
run: dotnet restore MeAjudaAi.sln --force-evaluate --locked-mode

- name: Build solution
run: dotnet build MeAjudaAi.sln --configuration Release --no-restore
Expand All @@ -83,16 +83,26 @@ jobs:
run: |
echo "🧪 Executando todos os testes..."

# Executar testes por projeto
# Executar testes unitários e de arquitetura
dotnet test tests/MeAjudaAi.Shared.Tests/MeAjudaAi.Shared.Tests.csproj \
--configuration Release --no-build --verbosity normal \
--collect:"XPlat Code Coverage" --results-directory TestResults/Shared
dotnet test tests/MeAjudaAi.Architecture.Tests/MeAjudaAi.Architecture.Tests.csproj \
--configuration Release --no-build --verbosity normal \
--collect:"XPlat Code Coverage" --results-directory TestResults/Architecture
# Executar testes de integração
dotnet test tests/MeAjudaAi.Integration.Tests/MeAjudaAi.Integration.Tests.csproj \
--configuration Release --no-build --verbosity normal \
--collect:"XPlat Code Coverage" --results-directory TestResults/Integration
# Executar testes de módulos (Users, etc)
dotnet test src/Modules/Users/Tests/MeAjudaAi.Modules.Users.Tests.csproj \
--configuration Release --no-build --verbosity normal \
--collect:"XPlat Code Coverage" --results-directory TestResults/Users
# Executar testes E2E
echo "🔍 Executando testes E2E..."
dotnet test tests/MeAjudaAi.E2E.Tests/MeAjudaAi.E2E.Tests.csproj \
--configuration Release --no-build --verbosity normal \
--collect:"XPlat Code Coverage" --results-directory TestResults/E2E

echo "✅ Todos os testes executados com sucesso"

Expand Down
Loading