Merge pull request #2 from managedcode/codex/audit-apis-and-migrate-t… #18
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: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Restore dependencies | |
| run: dotnet restore Together.slnx | |
| - name: Build | |
| run: dotnet build Together.slnx --configuration Release --no-restore | |
| - name: Test and collect coverage | |
| run: dotnet test Together.slnx --configuration Release --no-build -p:CollectCoverage=true -p:CoverletOutput=coverage/ | |
| - name: Copy coverage files | |
| run: | | |
| mkdir -p "${{ github.workspace }}/coverage" | |
| find . -name "*.opencover.xml" -exec sh -c 'cp "$1" "coverage/coverage-$(basename "$1")"' _ {} \; | |
| - name: List coverage files | |
| run: ls "${{ github.workspace }}/coverage/" | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v4 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |