Skip to content

Commit

Permalink
§ test .NET 7 §
Browse files Browse the repository at this point in the history
  • Loading branch information
ThiagoSousa81 authored Jan 3, 2025
1 parent 38a93ff commit ebfea22
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 1 deletion.
63 changes: 63 additions & 0 deletions .github/workflows/dotnet-v7-desktop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: .NET Core Desktop Build v7.0

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:

build:

strategy:
matrix:
configuration: [Debug, Release]

runs-on: windows-latest # Utilizando runner Windows mais recente

env:
Solution_Name: EBS-LAB.sln # Nome da solução .NET Core
Test_Project_Path: EBS-LAB\EBS-LAB.csproj # Caminho para o projeto de testes, se houver
Project_Directory: EBS-LAB # Diretório do projeto para correção de caminho

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

# Instalar o .NET SDK
- name: Install .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x # Versão do .NET Core que está sendo utilizada no projeto

# Instalar MSBuild
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2

# Executar testes (se existirem)
- name: Execute unit tests
run: |
dotnet restore $env:Solution_Name
dotnet test $env:Solution_Name
# Restaurar a aplicação .NET Core
- name: Restore the application
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}

# Build da solução .NET Core
- name: Build the application
run: msbuild $env:Solution_Name /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}

# Carregar artefatos de build (sem assinatura ou empacotamento)
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: Build Artifacts
path: ${{ env.Project_Directory }}\bin\${{ matrix.configuration }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: .NET Core Desktop Build
name: .NET Core Desktop Build v8.0

on:
push:
Expand Down

0 comments on commit ebfea22

Please sign in to comment.