<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: 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 --work=TestResults

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

    - name: Report Unit Test Results
      uses: MirrorNG/nunit-reporter@v1.0.11
      if: always()
      with:
        path: TestResults/**/*.xml
        reportTitle: Unit Test Results
        access-token: ${{ secrets.GITHUB_TOKEN }}<commit_msg>Use separate steps for reporting Linux and Windows test results.<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: 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 --work=TestResultsLinux

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

    - name: Report Unit Test Results (Linux)
      uses: MirrorNG/nunit-reporter@v1.0.11
      if: always()
      with:
        path: TestResultsLinux/**/*.xml
        reportTitle: Unit Test Results (Linux)
        access-token: ${{ secrets.GITHUB_TOKEN }}

    - name: Report Unit Test Results (Windows)
      uses: MirrorNG/nunit-reporter@v1.0.11
      if: always()
      with:
        path: TestResultsWindows/**/*.xml
        reportTitle: Unit Test Results (Windows)
        access-token: ${{ secrets.GITHUB_TOKEN }}
{'fraction_non_alphanumeric': 0.11805979255643685, 'fraction_numerical': 0.012202562538133009, 'mean_word_length': 2.4625131995776135, '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': '5877565', 'n_tokens_mistral': 1115, 'n_tokens_neox': 1055, 'n_words': 251}