Skip to content

[feature] Add extensible CI/CD pipeline with multi-OS support #4

[feature] Add extensible CI/CD pipeline with multi-OS support

[feature] Add extensible CI/CD pipeline with multi-OS support #4

name: Pipeline PR push
on:
pull_request:
jobs:
build:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET 8 Environment
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Create config file for ByteSync.Client
run: echo '${{ secrets.CLIENT_LOCAL_SETTINGS_JSON}}' > src/ByteSync.Client/local.settings.json
- run: dotnet restore --locked-mode
- run: dotnet clean --verbosity quiet
- run: dotnet build --verbosity quiet /property:WarningLevel=0
test:
needs: build
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET 8 Environment
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- run: dotnet restore --locked-mode
- name: Run Tests
run : dotnet test
- name: Upload Test Results as Artifacts
uses: actions/upload-artifact@v4
with:
name: PR-test-results-${{matrix.os}}
path: ./TestResults/*.trx
- name: Show Failed Tests
if: failure()
run: echo "Some tests failed. Check uploaded artifacts for detailed logs."