diff --git a/.github/workflows/pr-build-test.yml b/.github/workflows/pr-build-test.yml new file mode 100644 index 0000000..8a78c69 --- /dev/null +++ b/.github/workflows/pr-build-test.yml @@ -0,0 +1,36 @@ +name: Build and Test on PR + +on: + pull_request: + branches: [ master ] + push: + branches: [ master ] + +jobs: + build-and-test: + runs-on: macos-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.0.x' + + - name: Restore dependencies + run: dotnet restore ccm.sln + + - name: Build solution + run: dotnet build ccm.sln --configuration Release --no-restore + + - name: Run tests + run: dotnet test ccm.sln --configuration Release --no-build --verbosity normal --logger trx --results-directory TestResults + + - name: Upload test results + uses: actions/upload-artifact@v4 + if: always() + with: + name: test-results + path: TestResults/*.trx