Skip to content

Commit

Permalink
merge(v2.13.0): pull request #937 from DFE-Digital/development
Browse files Browse the repository at this point in the history
v2.13.0
  • Loading branch information
jimwashbrook authored Jan 10, 2025
2 parents be2dc27 + 891b5fc commit 0cc40d0
Show file tree
Hide file tree
Showing 198 changed files with 3,881 additions and 2,089 deletions.
14 changes: 14 additions & 0 deletions .github/actions/run-e2e-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,20 @@ runs:
config: baseUrl=${{ inputs.url }}
env: URL=${{ inputs.url }},DSi_Url=${{ inputs.dsi_url }},DSi_Email=${{ inputs.dsi_username }},DSi_Password=${{ inputs.dsi_password }},APP_ENVIRONMENT=${{ inputs.environment }},DSi_NoOrg_Email=${{ inputs.dsi_noorg_username }},DSi_NoOrg_Password=${{ inputs.dsi_noorg_password }}

- name: Merge test reports
shell: bash
working-directory: ./tests/Dfe.PlanTech.Web.E2ETests/
run: npm run report:merge

- name: Verify at least one test has run and passed
shell: bash
run: |
TEST_PASSES=$(cat ./tests/Dfe.PlanTech.Web.E2ETests/index.json | jq '.stats.passes')
if [ "$TEST_PASSES" -eq "0" ]; then
echo "Error: No passing tests have run"
exit 1
fi
- name: Store screenshots on test failure
uses: actions/upload-artifact@v4
if: failure()
Expand Down
22 changes: 22 additions & 0 deletions .github/actions/run-unit-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,28 @@ runs:
- name: Test
shell: bash
run: dotnet test ${{ inputs.solution_filename }} --no-restore --verbosity normal --collect:"XPlat Code Coverage" --logger:"trx;LogFileName=test-results.trx" || true

- name: Install XML tools
shell: bash
run: sudo apt-get install -y libxml2-utils

- name: Verify at least one test has run
shell: bash
run: |
total_count=0
while read file; do
count=$(xmllint --xpath "string(//*[local-name()='TestRun']/*[local-name()='ResultSummary']/*[local-name()='Counters']/@total)" "$file" 2>/dev/null)
echo "$file: $count tests executed"
total_count=$((total_count + count))
done < <(find tests -name "*.trx")
if [ $total_count -le 0 ]; then
echo "Error: No unit tests have been executed."
exit 1
else
echo "Total tests executed: $total_count"
fi
- name: Test Report
uses: dorny/test-reporter@v1
if: always()
Expand Down
93 changes: 80 additions & 13 deletions .github/semver-release/.releaserc.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,83 @@
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/github",
{
"successComment": false
}
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits",
"releaseRules": [
{ "breaking": true, "release": "major" },
{ "type": "breaking", "release": "major" },
{ "revert": true, "release": "patch" },
{ "type": "feat", "release": "minor" },
{ "type": "fix", "release": "patch" },
{ "type": "perf", "release": "patch" },
{ "emoji": ":racehorse:", "release": "patch" },
{ "emoji": ":bug:", "release": "patch" },
{ "emoji": ":penguin:", "release": "patch" },
{ "emoji": ":apple:", "release": "patch" },
{ "emoji": ":checkered_flag:", "release": "patch" },
{ "tag": "BUGFIX", "release": "patch" },
{ "tag": "FEATURE", "release": "minor" },
{ "tag": "SECURITY", "release": "patch" },
{ "tag": "Breaking", "release": "major" },
{ "tag": "Fix", "release": "patch" },
{ "tag": "Update", "release": "minor" },
{ "tag": "New", "release": "minor" },
{ "type": "FEAT", "release": "minor" },
{ "type": "FIX", "release": "patch" },
{ "type": "merge", "release": "patch" },
{ "type": "ticket", "release": "patch" },
{ "type": "ci", "release": "patch" },
{ "type": "iac", "release": "patch" },
{ "type": "build", "release": "patch" },
{ "message": "**", "release": "patch" }
],
"parserOpts": {
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES"]
}
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"noteKeywords": [
"BREAKING CHANGE",
"BREAKING CHANGES",
"BREAKING"
],
"types": [
{ "type": "breaking", "section": "Breaking changes" },
{ "type": "feat", "section": "Features" },
{ "type": "fix", "section": "Bug Fixes" },
{ "type": "style", "section": "Styling" },
{ "type": "refactor", "section": "Refactor" },
{ "type": "perf", "section": "Refactor" },
{ "type": "ticket", "section": "Completed Tickets" },
{ "type": "merge", "section": "Completed Tickets" },
{ "type": "ci", "section": "CI/CD" },
{ "type": "cicd", "section": "CI/CD" },
{ "type": "iac", "section": "IaC" },
{ "type": "chore", "hidden": true },
{ "type": "docs", "hidden": true },
{ "type": "test", "hidden": true }
]
},
"writerOpts": {
"commitsSort": ["subject", "scope"]
}
}
],
[
"@semantic-release/github",
{
"successComment": false
}
]
],
"branches": [
{ "name": "main" },
{ "name": "development", "prerelease": true }
]
],
"branches": [
{ "name": "main" },
{ "name": "development", "prerelease": true }
]
}
Loading

0 comments on commit 0cc40d0

Please sign in to comment.