🛠️ CI Build & Test #258
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: 🛠️ CI Build & Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| schedule: | |
| - cron: "0 2 * * *" # run at 2 AM UTC | |
| jobs: | |
| build: | |
| name: 🔨 Build and Test (CI) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: 🗂️ Checkout the repository | |
| uses: actions/checkout@main | |
| - name: ⬇️ Install .NET 6 | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '6.0.x' | |
| - name: ⬇️ Install .NET 7 | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '7.0.x' | |
| - name: ⬇️ Install .NET 8 | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: ⬇️ Install .NET 9 | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: 🛠️ Build code | |
| run: dotnet build --configuration Release -p:TreatWarningsAsErrors=true | |
| - name: 🧪 Run tests | |
| run: | | |
| echo "## 📊 Unit test results" >> $GITHUB_STEP_SUMMARY | |
| dotnet test --no-build --configuration Release tests/AutomationPipelines.Tests/AutomationPipelines.Tests.csproj |