Properly handle average confidence for translation jos with no pretra… #2317
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI Build | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Start MongoDB | |
| uses: supercharge/mongodb-github-action@1.12.1 | |
| with: | |
| mongodb-version: "8.0" | |
| mongodb-replica-set: rs0 | |
| # Pull in a matching machine repo branch if it exists to use it rather than the released version of Machine. | |
| - name: Check if there is a corresponding branch in Machine | |
| id: find_matching_branch | |
| continue-on-error: true | |
| if: ${{ github.ref_name != 'main' }} | |
| run: cd .. && git clone https://github.com/sillsdev/machine.git --branch ${{ github.ref_name }} && dotnet build machine | |
| - name: Restore dotnet tools | |
| run: dotnet tool restore | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Check formatting | |
| run: dotnet csharpier check . | |
| - name: Build | |
| run: dotnet build --no-restore -c Release | |
| - name: Pre-Test | |
| run: sudo mkdir -p /var/lib/serval/files && sudo chmod -R 777 /var/lib/serval | |
| - name: Test | |
| run: dotnet test --verbosity normal --filter "TestCategory!=E2E&TestCategory!=E2EMissingServices" --collect:"Xplat Code Coverage" --logger "trx;LogFileName=test-results.trx" | |
| - name: Test report | |
| uses: dorny/test-reporter@v3.0.0 | |
| if: success() || failure() | |
| with: | |
| name: NUnit Tests | |
| path: src/**/TestResults/test-results.trx | |
| reporter: dotnet-trx | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v6 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |