Skip to content

Phase 2: Data Layer Migration from Entity Framework 6.1.3 to Entity F… #3

Phase 2: Data Layer Migration from Entity Framework 6.1.3 to Entity F…

Phase 2: Data Layer Migration from Entity Framework 6.1.3 to Entity F… #3

Workflow file for this run

name: .NET Core CI/CD
on:
push:
branches: [ master, main, 'devin/**' ]
paths:
- '**.Core/**'
- 'SampleMvcWebApp.Core.sln'
- '.github/workflows/dotnet-core.yml'
pull_request:
branches: [ master, main ]
paths:
- '**.Core/**'
- 'SampleMvcWebApp.Core.sln'
- '.github/workflows/dotnet-core.yml'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: ['8.0.x']
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Display .NET version
run: dotnet --version
- name: Restore dependencies
run: dotnet restore SampleMvcWebApp.Core.sln
- name: Build
run: dotnet build SampleMvcWebApp.Core.sln --no-restore --configuration Release
- name: Test
run: dotnet test SampleMvcWebApp.Core.sln --no-build --configuration Release --verbosity normal --logger "trx;LogFileName=test-results.trx"
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: '**/TestResults/*.trx'
code-quality:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Restore dependencies
run: dotnet restore SampleMvcWebApp.Core.sln
- name: Build with analyzers
run: dotnet build SampleMvcWebApp.Core.sln --configuration Release /p:TreatWarningsAsErrors=false
docker-build:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: false
tags: samplemvcwebapp-core:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max