Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/azure-functions-smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ jobs:
with:
global-json-file: global.json

- name: Restore dependencies
run: dotnet restore test/AzureFunctionsSmokeTests/AzureFunctionsSmokeTests.csproj

- name: Run smoke tests
run: |
cd test/AzureFunctionsSmokeTests
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/codeQL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,21 @@ jobs:
with:
submodules: true

- name: Setup .NET
uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5.4.0
- name: Setup .NET 6.0
uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5.4.0
with:
dotnet-version: '6.0.x'

- name: Setup .NET from global.json
uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5.4.0
with:
global-json-file: global.json

- name: Restore dependencies
run: dotnet restore $solution
run: dotnet restore "$env:solution" --configfile "$env:GITHUB_WORKSPACE\nuget.config"

- name: Build
run: dotnet build $solution #--configuration $config #--no-restore -p:FileVersionRevision=$GITHUB_RUN_NUMBER -p:ContinuousIntegrationBuild=true
run: dotnet build "$env:solution" --no-restore -p:FileVersionRevision=$env:GITHUB_RUN_NUMBER -p:ContinuousIntegrationBuild=true

# Run CodeQL analysis
- name: Perform CodeQL Analysis
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/validate-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ jobs:
global-json-file: global.json

- name: Restore dependencies
run: dotnet restore $env:solution
run: dotnet restore "$env:solution" --configfile "$env:GITHUB_WORKSPACE\nuget.config"

- name: Build
run: dotnet build $env:solution --configuration $env:config --no-restore -p:FileVersionRevision=$env:GITHUB_RUN_NUMBER
run: dotnet build "$env:solution" --configuration $env:config --no-restore -p:FileVersionRevision=$env:GITHUB_RUN_NUMBER

- name: Test
run: dotnet test $env:solution --configuration $env:config --no-build --verbosity normal
run: dotnet test "$env:solution" --configuration $env:config --no-build --no-restore --verbosity normal

- name: Pack
run: dotnet pack $env:solution --configuration $env:config --no-build
run: dotnet pack "$env:solution" --configuration $env:config --no-build --no-restore

- name: Upload
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
Expand Down
5 changes: 4 additions & 1 deletion azure-pipelines-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ steps:
useGlobalJson: true

# Start by restoring all the dependencies. This needs to be its own task.
- task: NuGetAuthenticate@1
displayName: Authenticate NuGet feeds

- task: DotNetCoreCLI@2
displayName: Restore
inputs:
Expand Down Expand Up @@ -105,7 +108,7 @@ steps:
inputs:
command: custom
custom: pack
arguments: --no-build $(build_args) $(pack_binlog)
arguments: --no-build --no-restore $(build_args) $(pack_binlog)
projects: $(project)

# Digitally sign all the nuget packages with the Microsoft certificate.
Expand Down
5 changes: 4 additions & 1 deletion eng/templates/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ jobs:
useGlobalJson: true

# Start by restoring all the dependencies. This needs to be its own task.
- task: NuGetAuthenticate@1
displayName: Authenticate NuGet feeds

- task: DotNetCoreCLI@2
displayName: Restore
inputs:
Expand Down Expand Up @@ -75,7 +78,7 @@ jobs:
inputs:
command: custom
custom: pack
arguments: --no-build $(build_args) $(pack_binlog)
arguments: --no-build --no-restore $(build_args) $(pack_binlog)
projects: $(project)

- template: ci/sign-files.yml@eng
Expand Down
9 changes: 7 additions & 2 deletions nuget.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear/>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<clear />
<add key="upstream-public" value="https://pkgs.dev.azure.com/azfunc/public/_packaging/upstream-public/nuget/v3/index.json" protocolVersion="3" />
</packageSources>
<packageSourceMapping>
<packageSource key="upstream-public">
<package pattern="*" />
</packageSource>
</packageSourceMapping>
</configuration>
37 changes: 33 additions & 4 deletions test/AzureFunctionsSmokeTests/run-smoketests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ $ErrorActionPreference = "Stop"
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$projectDir = $scriptDir
$publishDir = Join-Path $projectDir "publish"
$repoRoot = Split-Path -Parent (Split-Path -Parent $scriptDir)
$nugetConfig = Join-Path $repoRoot "nuget.config"

Write-Host "=== Azure Functions Smoke Test Runner ===" -ForegroundColor Cyan
Write-Host ""
Expand Down Expand Up @@ -63,9 +65,27 @@ try {
Cleanup
Write-Host ""

# Step 1: Build the project
Write-Host "Step 1: Building the Azure Functions project..." -ForegroundColor Green
dotnet build $projectDir -c Release
# Step 1: Restore and build the project
Write-Host "Step 1: Restoring and building the Azure Functions project..." -ForegroundColor Green
$restoreArguments = @(
"restore"
$projectDir
"--configfile"
$nugetConfig
)
dotnet @restoreArguments
if ($LASTEXITCODE -ne 0) {
throw "Restore failed with exit code $LASTEXITCODE"
}

$buildArguments = @(
"build"
$projectDir
"-c"
"Release"
"--no-restore"
)
dotnet @buildArguments
if ($LASTEXITCODE -ne 0) {
throw "Build failed with exit code $LASTEXITCODE"
}
Expand All @@ -77,7 +97,16 @@ try {
if (Test-Path $publishDir) {
Remove-Item $publishDir -Recurse -Force
}
dotnet publish $projectDir -c Release -o $publishDir
$publishArguments = @(
"publish"
$projectDir
"-c"
"Release"
"-o"
$publishDir
"--no-restore"
)
dotnet @publishArguments
if ($LASTEXITCODE -ne 0) {
throw "Publish failed with exit code $LASTEXITCODE"
}
Expand Down
Loading