Skip to content

CI/CD

CI/CD #1

Workflow file for this run

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: CI
on:
push:
branches:
- 'main'
- 'master'
pull_request:
branches:
- 'main'
- 'master'
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true
defaults:
run:
shell: pwsh
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Build Solution
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage"
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: |
**/TestResults/**/*.xml
**/TestResults/**/*.trx
retention-days: 7
- name: Validate package can be created
run: dotnet pack src/BlazorFrame/BlazorFrame.csproj --configuration Release --no-build --output ./temp-packages
- name: Cleanup temp packages
run: Remove-Item -Path ./temp-packages -Recurse -Force