diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 9b9a7537..04330d8c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -7,27 +7,27 @@ assignees: "" --- ## 🐞 Bug Description -A clear and concise description of the issue. + -## πŸ“Œ Steps to Reproduce -1. Go to '...' +## Steps to Reproduce + -## πŸ§ͺ Expected Behavior -What should have happened? +## Expected Behavior + -## πŸ“· Screenshots / Logs (if applicable) -Paste stack traces, console logs, or screenshots. +## Screenshots / Logs (if applicable) + -## 🧩 Environment +## Environment - UltimateAuth version: - .NET version: - Platform: (Blazor / MAUI / ASP.NET Core / Other) @@ -35,5 +35,5 @@ Paste stack traces, console logs, or screenshots. -## βœ” Additional Context -Add any other relevant context about the problem here. +## Additional Context + diff --git a/.github/ISSUE_TEMPLATE/design_proposal.md b/.github/ISSUE_TEMPLATE/design_proposal.md index 128f0df2..20073113 100644 --- a/.github/ISSUE_TEMPLATE/design_proposal.md +++ b/.github/ISSUE_TEMPLATE/design_proposal.md @@ -7,39 +7,39 @@ assignees: "" --- ## 🧠 Summary -Briefly describe the concept or design you're proposing. + --- -## 🎯 Goals -What problem does this design solve? -What are the objectives? +## Goals + --- -## 🧩 Proposed Architecture -Describe how this feature or change should work: +## Proposed Architecture + --- -## πŸ§ͺ Alternatives Considered -List alternative designs and why they were not chosen. +## Alternatives Considered + --- -## πŸ”₯ Risks / Trade-offs -Any potential drawbacks or complexities? +## Risks / Trade-offs + --- -## πŸ”— Related Issues -(Optional) Provide related bugs, features, or discussions. +## Related Issues + --- -## βœ” Additional Notes -Add anything else that may help the maintainers evaluate this proposal. +## Additional Notes + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 7a4cdb6c..4097a648 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -7,27 +7,27 @@ assignees: "" --- ## ✨ Feature Description -Describe the feature you'd like to see. + --- -## πŸ’‘ Why Is This Needed? -Explain the problem this feature solves or the value it provides. +## Why Is This Needed? + --- -## πŸ›  Suggested Implementation -If you have any implementation ideas, describe them: +## Suggested Implementation + --- -## πŸ”— Related Issues / Discussions -(Optional) Link any related issues or design proposals. +## Related Issues / Discussions + --- -## βœ” Additional Notes -Anything else we should know? +## Additional Notes + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 51252ee1..72451302 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -2,25 +2,27 @@ -## πŸ“˜ Summary +## Summary -## πŸ” Details +## Details -## 🧩 Related Issues -Link any related issues: +## Related Issues + -## πŸ›  Changes -- [ ] New feature +## Changes - [ ] Bug fix +- [ ] New feature - [ ] Refactoring - Improvement - [ ] Documentation - [ ] Samples +- [ ] Tests +- [ ] Identity Lab - [ ] Breaking change --- diff --git a/.github/workflows/ultimateauth-ci.yml b/.github/workflows/ultimateauth-ci.yml index 372dec56..6058261f 100644 --- a/.github/workflows/ultimateauth-ci.yml +++ b/.github/workflows/ultimateauth-ci.yml @@ -53,6 +53,7 @@ jobs: slug: CodeBeamOrg/UltimateAuth flags: framework + identity-lab-security: name: Identity Lab security (PostgreSQL) runs-on: ubuntu-latest @@ -75,18 +76,68 @@ jobs: --logger "trx;LogFileName=identity-lab.trx" --results-directory TestResults/IdentityLab - - name: Upload Identity Lab coverage to Codecov - uses: codecov/codecov-action@v5 - with: - token: ${{ secrets.CODECOV_TOKEN }} - slug: CodeBeamOrg/UltimateAuth - directory: TestResults/IdentityLab - flags: identitylab - fail_ci_if_error: true + - name: Generate Identity Lab coverage summary + if: always() + shell: bash + run: | + python3 - <<'PY' + import glob + import os + import xml.etree.ElementTree as ET + + reports = glob.glob( + "TestResults/IdentityLab/**/coverage.cobertura.xml", + recursive=True + ) + + summary_path = os.environ["GITHUB_STEP_SUMMARY"] + + with open(summary_path, "a", encoding="utf-8") as output: + output.write("## Identity Lab Coverage\n\n") + + if not reports: + output.write("Coverage report was not generated.\n") + raise SystemExit(0) - - name: Upload test results + reports = [ + path for path in reports + if "/In/" not in path.replace("\\", "/") + ] + + if not reports: + output.write("No usable coverage report found.\n") + raise SystemExit(0) + + report = ET.parse(reports[0]).getroot() + + line_rate = float(report.attrib.get("line-rate", 0)) + branch_rate = float(report.attrib.get("branch-rate", 0)) + lines_valid = int(report.attrib.get("lines-valid", 0)) + lines_covered = int(report.attrib.get("lines-covered", 0)) + branches_valid = int(report.attrib.get("branches-valid", 0)) + branches_covered = int(report.attrib.get("branches-covered", 0)) + + output.write("| Metric | Coverage |\n") + output.write("|---|---:|\n") + output.write(f"| Lines | {line_rate:.2%} |\n") + output.write(f"| Branches | {branch_rate:.2%} |\n") + output.write( + f"| Covered lines | {lines_covered:,} / {lines_valid:,} |\n" + ) + output.write( + f"| Covered branches | {branches_covered:,} / {branches_valid:,} |\n" + ) + output.write("\n") + output.write( + "Coverage is reported separately from UltimateAuth " + "framework coverage.\n" + ) + PY + + - name: Upload Identity Lab test and coverage results if: always() uses: actions/upload-artifact@v4 with: name: identity-lab-test-results path: TestResults/IdentityLab + diff --git a/codecov.yml b/codecov.yml index fde64fe1..7ee2df0d 100644 --- a/codecov.yml +++ b/codecov.yml @@ -5,7 +5,6 @@ coverage: status: project: default: false - framework: flags: - framework @@ -14,7 +13,6 @@ coverage: patch: default: false - framework: flags: - framework @@ -26,11 +24,8 @@ flags: paths: - src/ - identitylab: - paths: - - apps/identity-lab/ - ignore: - "samples/**" - "tests/**" - - "**/Migrations/**" \ No newline at end of file + - "apps/**" + - "**/Migrations/**"