Skip to content

Facebook Messenger

Facebook Messenger #27

Workflow file for this run

name: Messaging PR Build
permissions:
contents: read
packages: read
on:
pull_request:
branches: [ main, develop ]
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
build:
name: "Build and Test"
strategy:
matrix:
include:
- dotnet: '8.0.x'
dotnet-framework: 'net8.0'
os: ubuntu-latest
- dotnet: '8.0.x'
dotnet-framework: 'net8.0'
os: windows-latest
- dotnet: '9.0.x'
dotnet-framework: 'net9.0'
os: ubuntu-latest
- dotnet: '9.0.x'
dotnet-framework: 'net9.0'
os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET ${{ matrix.dotnet }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Restore dependencies
run: dotnet restore -p:TargetFramework=${{ matrix.dotnet-framework }}
- name: Build
run: dotnet build --no-restore -c Release -f ${{ matrix.dotnet-framework }}
- name: Test
run: dotnet test --no-build --verbosity normal -c Release -f ${{ matrix.dotnet-framework }}
summary:
needs: build
runs-on: ubuntu-latest
if: always()
steps:
- name: PR Build Summary
run: |
echo "## 🔍 Pull Request Build Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Property | Value |" >> $GITHUB_STEP_SUMMARY
echo "|----------|-------|" >> $GITHUB_STEP_SUMMARY
echo "| PR Number | #${{ github.event.number }} |" >> $GITHUB_STEP_SUMMARY
echo "| Source Branch | \`${{ github.head_ref }}\` |" >> $GITHUB_STEP_SUMMARY
echo "| Target Branch | \`${{ github.base_ref }}\` |" >> $GITHUB_STEP_SUMMARY
echo "| Build Status | ${{ needs.build.result == 'success' && '✅ Success' || '❌ Failed' }} |" >> $GITHUB_STEP_SUMMARY
echo "| Coverage | 📊 Collected at Release Only |" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ "${{ needs.build.result }}" == "success" ]; then
echo "✅ **Build Successful**: All tests passed." >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "📋 **Test Execution Notes**:" >> $GITHUB_STEP_SUMMARY
echo "- **Ubuntu (.NET 8 & 9)**: All tests executed" >> $GITHUB_STEP_SUMMARY
echo "- **Windows (.NET 8 & 9)**: All tests executed" >> $GITHUB_STEP_SUMMARY
echo "- **Code Coverage**: Skipped (collected only during releases)" >> $GITHUB_STEP_SUMMARY
else
echo "❌ **Build Failed**: Please check the build logs for more details." >> $GITHUB_STEP_SUMMARY
fi
echo "" >> $GITHUB_STEP_SUMMARY
echo "📝 **Note**: This is a PR build - no packages are published and no coverage is collected." >> $GITHUB_STEP_SUMMARY
if [ "${{ github.event.pull_request.draft }}" == "true" ]; then
echo "" >> $GITHUB_STEP_SUMMARY
echo "🚧 **Draft PR**: This pull request is marked as draft." >> $GITHUB_STEP_SUMMARY
fi