<commit_before>name: Tests

on:
  push:
    branches: "*"
  pull_request:
    branches: "*"

jobs:
  test:
    name: Run tests

    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ ubuntu-latest, windows-latest ]

    steps:
    - name: Install mono
      if: matrix.os == 'ubuntu-latest'
      run: sudo apt-get install mono-complete

    - name: Add msbuild to PATH
      if: matrix.os == 'windows-latest'
      uses: microsoft/setup-msbuild@v1.0.2

    - name: Checkout Source
      uses: actions/checkout@v2

    - name: Install NuGet
      uses: nuget/setup-nuget@v1.0.5

    - name: Build Duplicati
      run: |
        nuget restore Duplicati.sln
        msbuild -p:Configuration=Release Duplicati.sln

    - name: Run Unit Tests (Linux)
      if: matrix.os == 'ubuntu-latest'
      run: |
        nuget install NUnit.Runners -Version 3.12.0 -OutputDirectory nunit
        mono nunit/NUnit.ConsoleRunner.3.12.0/tools/nunit3-console.exe Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==Utility --result=TestResults/test_results_linux.xml

    - name: Run Unit Tests (Windows)
      if: matrix.os == 'windows-latest'
      run: nunit3-console.exe Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==Utility --result=TestResults/test_results_windows.xml

    - name: Report Unit Test Results<commit_msg>Try to consolidate test steps.<commit_after>name: Tests

on:
  push:
    branches: "*"
  pull_request:
    branches: "*"

jobs:
  test:
    name: Run tests

    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ ubuntu-latest, windows-latest ]

    steps:
    - name: Install mono
      if: matrix.os == 'ubuntu-latest'
      run: sudo apt-get install mono-complete

    - name: Add msbuild to PATH
      if: matrix.os == 'windows-latest'
      uses: microsoft/setup-msbuild@v1.0.2

    - name: Checkout Source
      uses: actions/checkout@v2

    - name: Install NuGet
      uses: nuget/setup-nuget@v1.0.5

    - name: Build Duplicati
      run: |
        nuget restore Duplicati.sln
        msbuild -p:Configuration=Release Duplicati.sln

    - name: Run Unit Tests
      run: |
        nuget install NUnit.Runners -Version 3.12.0 -OutputDirectory nunit
        mono nunit/NUnit.ConsoleRunner.3.12.0/tools/nunit3-console.exe Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==Utility --result="TestResults/test_results_${{ matrix.os }}.xml"

    - name: Report Unit Test Results
{'fraction_non_alphanumeric': 0.11596505162827642, 'fraction_numerical': 0.013105639396346307, 'mean_word_length': 2.49375866851595, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 3}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4100053', 'n_tokens_mistral': 883, 'n_tokens_neox': 837, 'n_words': 192}