TestCore_develop_8.0.4_30 #30
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: Test Core API | |
| run-name: TestCore_${{ github.ref_name }}_${{ vars.LIBRARY_VERSION }}_${{ github.run_number }} | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - master | |
| - develop | |
| paths: | |
| - 'DryWetMidi/**' | |
| - 'DryWetMidi.Tests/**' | |
| - 'DryWetMidi.Tests.Common/**' | |
| - '.github/workflows/test-core.yml' | |
| - '.github/workflows/build-native-libs.yml' | |
| - '.github/actions/**' | |
| - 'Resources/Native/**' | |
| pull_request: | |
| branches: | |
| - develop | |
| paths: | |
| - 'DryWetMidi/**' | |
| - 'DryWetMidi.Tests/**' | |
| - 'DryWetMidi.Tests.Common/**' | |
| - '.github/workflows/test-core.yml' | |
| - '.github/workflows/build-native-libs.yml' | |
| - '.github/actions/**' | |
| - 'Resources/Native/**' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-native-libs: | |
| name: Build Native Libraries | |
| uses: ./.github/workflows/build-native-libs.yml | |
| run-tests: | |
| name: Run tests (${{ matrix.os }}, ${{ matrix.framework }}) | |
| needs: build-native-libs | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 60 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: windows-11-arm | |
| framework: Net | |
| - os: macos-latest | |
| framework: Net | |
| - os: ubuntu-24.04-arm | |
| framework: Net | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Copy native libraries | |
| uses: ./.github/actions/copy-native-libraries | |
| - name: Setup framework | |
| id: framework | |
| uses: ./.github/actions/setup-framework | |
| with: | |
| framework: ${{ matrix.framework }} | |
| net-tfm: ${{ vars.BUILD_FRAMEWORK_NET_TFM || 'net8.0' }} | |
| net-sdk-version: ${{ vars.BUILD_FRAMEWORK_NET_SDK_VERSION }} | |
| netframework-tfm: ${{ vars.BUILD_FRAMEWORK_NETFRAMEWORK_TFM }} | |
| netframework-sdk-version: ${{ vars.BUILD_FRAMEWORK_NETFRAMEWORK_SDK_VERSION }} | |
| - name: Remove Multimedia folder | |
| shell: pwsh | |
| run: | | |
| $multimediaPath = Resolve-Path "DryWetMidi.Tests/Multimedia" | |
| if (Test-Path $multimediaPath) { | |
| Write-Host "Removing Multimedia folder: $multimediaPath" | |
| Remove-Item $multimediaPath -Recurse -Force | |
| } else { | |
| Write-Host "Multimedia folder not found, skipping removal" | |
| } | |
| - name: Build tests | |
| uses: ./.github/actions/build-tests | |
| with: | |
| tfm: ${{ steps.framework.outputs.tfm }} | |
| configuration: ${{ vars.TEST_BUILD_CONFIGURATION || 'Release' }} | |
| - name: Run unit tests | |
| continue-on-error: false | |
| shell: pwsh | |
| run: | | |
| dotnet test DryWetMidi.Tests/Melanchall.DryWetMidi.Tests.csproj ` | |
| --blame ` | |
| --no-build ` | |
| --configuration ${{ vars.TEST_BUILD_CONFIGURATION || 'Release' }} ` | |
| --framework ${{ steps.framework.outputs.tfm }} ` | |
| --verbosity normal ` | |
| --diag diagnostic.log ` | |
| --logger "console;verbosity=normal" ` | |
| -p:SolutionDir="${{ github.workspace }}/" | |
| - name: Collect logs | |
| if: always() | |
| uses: ./.github/actions/collect-logs | |
| with: | |
| suffix: _${{ matrix.os }}_${{ matrix.framework }} |