Skip to content

Fix LT-22630: Custom first vernacular fields defaulting to analysis #3592

Fix LT-22630: Custom first vernacular fields defaulting to analysis

Fix LT-22630: Custom first vernacular fields defaulting to analysis #3592

Workflow file for this run

name: Flex CI
on:
push:
branches: ["release/**", "main", "feature/PubSub"]
pull_request:
branches: ["release/**", "main", "feature/PubSub"]
workflow_dispatch:
permissions:
contents: read
checks: write
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
debug_build_and_test:
name: Build Debug and run tests
runs-on: windows-2022
steps:
- name: Checkout Files
uses: actions/checkout@v7
id: checkout
- name: Build with tests
id: build
shell: powershell
run: |
.\build.ps1 -Configuration Debug -BuildTests
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
- name: Run tests
id: test
shell: powershell
run: |
.\test.ps1 -Configuration Debug -NoBuild -Coverage -TestFilter 'TestCategory!=LongRunning&TestCategory!=ByHand&TestCategory!=SmokeTest&TestCategory!=DesktopRequired'
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
# The Codecov CLI retries individual HTTP requests, but whole-invocation failures (503 storms,
# commit-creation errors) slip past it. Add one step-level retry after a backoff; the gate step
# below fails CI if neither attempt succeeds.
- name: Upload coverage to Codecov (attempt 1)
id: codecov1
if: ${{ !cancelled() }}
continue-on-error: true
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: Output/Debug/TestResults/CoverageReport/Cobertura.xml
flags: managed
name: FieldWorks
- name: Wait before Codecov retry
if: ${{ !cancelled() && steps.codecov1.outcome == 'failure' }}
shell: powershell
run: Start-Sleep -Seconds 30
- name: Upload coverage to Codecov (attempt 2)
id: codecov2
if: ${{ !cancelled() && steps.codecov1.outcome == 'failure' }}
continue-on-error: true
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: Output/Debug/TestResults/CoverageReport/Cobertura.xml
flags: managed
name: FieldWorks
- name: Verify Codecov upload succeeded
if: ${{ !cancelled() }}
shell: powershell
run: |
$outcomes = @('${{ steps.codecov1.outcome }}', '${{ steps.codecov2.outcome }}')
if ($outcomes -contains 'success') { Write-Host 'Coverage uploaded to Codecov.'; exit 0 }
Write-Error 'Codecov upload failed after 2 attempts.'
exit 1
- name: Summarize native test results
if: ${{ always() }}
shell: powershell
run: |
.\Build\Agent\Summarize-NativeTestResults.ps1 -Configuration Debug
- name: Collect render comparison artifacts
id: render_artifacts
if: ${{ !cancelled() && failure() }}
shell: pwsh
run: .\Build\Agent\Collect-RenderArtifacts.ps1 -SearchRoot . -OutputDirectory .\Output\RenderArtifacts
- name: Upload render comparison artifacts
id: upload_render_artifacts
if: ${{ !cancelled() && steps.render_artifacts.outputs.has_artifacts == 'true' }}
uses: actions/upload-artifact@v7
with:
name: render-comparison-artifacts-${{ github.run_id }}-${{ github.run_attempt }}
path: Output/RenderArtifacts
retention-days: 30
if-no-files-found: error
- name: Summarize render comparison artifacts
if: ${{ github.event_name == 'pull_request' && !cancelled() && (success() || steps.render_artifacts.outputs.has_artifacts == 'true') }}
shell: pwsh
continue-on-error: true
env:
ARTIFACT_URL: ${{ steps.upload_render_artifacts.outputs.artifact-url }}
FAILURE_COUNT: ${{ steps.render_artifacts.outputs.failure_count }}
HAS_ARTIFACTS: ${{ steps.render_artifacts.outputs.has_artifacts }}
run: .\Build\Agent\Report-RenderArtifacts.ps1 -SkipComment
- name: Build render comparison failure comment
id: render_failure_comment
if: ${{ github.event_name == 'pull_request' && !cancelled() && steps.render_artifacts.outputs.has_artifacts == 'true' }}
shell: pwsh
env:
ARTIFACT_URL: ${{ steps.upload_render_artifacts.outputs.artifact-url }}
FAILURE_COUNT: ${{ steps.render_artifacts.outputs.failure_count }}
HAS_ARTIFACTS: ${{ steps.render_artifacts.outputs.has_artifacts }}
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
run: .\Build\Agent\Build-RenderArtifactComment.ps1
- name: Update render comparison PR comment for failures
if: ${{ github.event_name == 'pull_request' && !cancelled() && steps.render_artifacts.outputs.has_artifacts == 'true' }}
uses: marocchino/sticky-pull-request-comment@0ea0beb66eb9baf113663a64ec522f60e49231c0 # v3.0.4
with:
header: fieldworks-render-comparison-artifacts
path: ${{ steps.render_failure_comment.outputs.comment_path }}
skip_unchanged: true
- name: Build render comparison resolved comment
id: render_clean_comment
if: ${{ github.event_name == 'pull_request' && !cancelled() && success() }}
shell: pwsh
env:
GITHUB_TOKEN: ${{ github.token }}
HAS_ARTIFACTS: false
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
run: .\Build\Agent\Build-RenderArtifactComment.ps1
- name: Update render comparison PR comment for clean run
if: ${{ github.event_name == 'pull_request' && !cancelled() && success() }}
uses: marocchino/sticky-pull-request-comment@0ea0beb66eb9baf113663a64ec522f60e49231c0 # v3.0.4
with:
header: fieldworks-render-comparison-artifacts
only_update: true
path: ${{ steps.render_clean_comment.outputs.comment_path }}
skip_unchanged: true
- name: Upload TRX test results (managed)
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v7
with:
name: trx-results
path: |
**/*.trx
if-no-files-found: warn
- uses: actions/upload-artifact@v7
if: ${{ !cancelled() && failure() }}
with:
name: build-logs
path: |
./*.log
./Output/**/*.log
./Output/**/*.log.stderr
publish_test_results:
name: Publish Test Results
if: ${{ !cancelled() }}
needs: debug_build_and_test
runs-on: ubuntu-latest
permissions:
contents: read
issues: read
checks: write
pull-requests: write
steps:
- name: Download TRX artifacts
uses: actions/download-artifact@v8
with:
name: trx-results
path: test-results
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@d0a4676d0e0b938bc201470d88276b7c74c712b3
with:
files: 'test-results/**/*.trx'
check_name: NUnit Tests
comment_mode: ${{ github.event_name == 'pull_request' && 'always' || 'off' }}
job_summary: true
fail_on: test failures