-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (66 loc) · 3.13 KB
/
pre-integration.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: "Pre-Integration"
on:
pull_request:
types:
- opened
- synchronize
- reopened
jobs:
dotnet-build:
runs-on: windows-latest
steps:
- name: 🛒 Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: ⚙️ Setup dotnet 8.0.1xx
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.1xx'
- name: 📐 Clear NuGet Cache
run: dotnet nuget locals all --clear
- name: 📐 Ensure nuget.org added as package source on Windows
run: dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org --configfile $env:APPDATA\NuGet\NuGet.Config
continue-on-error: true
- name: 🔁 Restore packages
run: dotnet restore Atc.Installer-WithoutSetup.sln
- name: 🛠️ Building library in release mode with MSBuild
run: |
$vsWhereExePath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$vsInstallationPath = & $vsWhereExePath -latest -products * -requires Microsoft.Component.MSBuild -property installationPath
$msBuildExePath = Join-Path $vsInstallationPath "MSBuild\Current\Bin\MSBuild.exe"
& $msBuildExePath Atc.Installer-WithoutSetup.sln -p:Configuration=Release -p:Platform="Any CPU" -m
shell: pwsh
# dotnet-test:
# runs-on: windows-latest
# needs:
# - dotnet-build
# steps:
# - name: 🛒 Checkout repository
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: ⚙️ Setup dotnet 8.0.1xx
# uses: actions/setup-dotnet@v4
# with:
# dotnet-version: '8.0.1xx'
# - name: 📐 Ensure nuget.org added as package source on Windows
# run: dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org --configfile $env:APPDATA\NuGet\NuGet.Config
# continue-on-error: true
# - name: 🔁 Restore packages
# run: dotnet restore Atc.Installer-WithoutSetup.sln
# - name: 🛠️ Building library in release mode with MSBuild
# run: |
# $vsWhereExePath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
# $vsInstallationPath = & $vsWhereExePath -latest -products * -requires Microsoft.Component.MSBuild -property installationPath
# $msBuildExePath = Join-Path $vsInstallationPath "MSBuild\Current\Bin\MSBuild.exe"
# & $msBuildExePath Atc.Installer-WithoutSetup.sln -p:Configuration=Release -p:Platform="Any CPU" -m
# shell: pwsh
# - name: 🧪 Run unit tests with MSBuild
# run: |
# $vsWhereExePath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
# $vsInstallationPath = & $vsWhereExePath -latest -products * -requires Microsoft.Component.MSBuild -property installationPath
# $vstestPath = Join-Path $vsInstallationPath "Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe"
# $testAssemblies = (Get-ChildItem -Recurse -Filter *.Test.dll).FullName
# & $vstestPath $testAssemblies
# shell: pwsh