move to TUnit, fix thread safety edge cases #207
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: .NET CI | |
| on: | |
| push: | |
| branches: [ "next" ] | |
| pull_request: | |
| branches: [ "next" ] | |
| env: | |
| DOTNET_VERSION: '10.0.103' | |
| NODE_VERSION: '24' | |
| permissions: | |
| contents: read | |
| statuses: write | |
| jobs: | |
| build-and-test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| - name: Restore dependencies | |
| working-directory: src | |
| run: dotnet restore FastClonerCi.slnf | |
| - name: Build | |
| working-directory: src | |
| run: dotnet build FastClonerCi.slnf --no-restore | |
| - name: Test | |
| working-directory: src | |
| run: dotnet test --solution FastClonerCi.slnf --no-build --verbosity normal | |
| - name: Update GitHub status check | |
| if: always() | |
| uses: Sibz/github-status-action@v1 | |
| with: | |
| authToken: ${{secrets.GITHUB_TOKEN}} | |
| context: "Tests (${{ matrix.os }})" | |
| description: "The tests on ${{ matrix.os }} ${{ job.status == 'success' && 'passed' || 'failed' }}" | |
| state: ${{ job.status == 'success' && 'success' || 'failure' }} | |
| sha: ${{ github.event.pull_request.head.sha || github.sha }} | |
| target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
| build-netstandard20: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| - name: Build FastCloner for netstandard2.0 | |
| working-directory: src | |
| run: dotnet build FastCloner/ --framework netstandard2.0 | |
| - name: Update GitHub status check | |
| if: always() | |
| uses: Sibz/github-status-action@v1 | |
| with: | |
| authToken: ${{secrets.GITHUB_TOKEN}} | |
| context: 'Build (netstandard2.0)' | |
| description: "The build for netstandard2.0 ${{ job.status == 'success' && 'passed' || 'failed' }}" | |
| state: ${{ job.status == 'success' && 'success' || 'failure' }} | |
| sha: ${{ github.event.pull_request.head.sha || github.sha }} | |
| target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
| build-net46: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET Framework | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| - name: Build FastCloner for net46 | |
| working-directory: src | |
| run: dotnet build FastCloner/ --framework net46 | |
| - name: Update GitHub status check | |
| if: always() | |
| uses: Sibz/github-status-action@v1 | |
| with: | |
| authToken: ${{secrets.GITHUB_TOKEN}} | |
| context: 'Build (net46)' | |
| description: "The build for net46 ${{ job.status == 'success' && 'passed' || 'failed' }}" | |
| state: ${{ job.status == 'success' && 'success' || 'failure' }} | |
| sha: ${{ github.event.pull_request.head.sha || github.sha }} | |
| target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} |