Skip to content

Commit

Permalink
add public build (first draft) (#1134)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmrdavid authored Jul 12, 2024
1 parent 934a5b6 commit d4b98d4
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 0 deletions.
57 changes: 57 additions & 0 deletions eng/ci/public-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# This build is used for public PR and CI builds.

# Run on pushes to main
trigger:
batch: true
branches:
include:
- main

# Run nightly to catch new CVEs and to report SDL often.
schedules:
- cron: "0 0 * * *"
displayName: Nightly Run
branches:
include:
- main
always: true # Always run pipeline irrespective of changes since the last successful scheduled run; default is false

# Run on all PRs
pr:
branches:
include:
- '*'

resources:
repositories:
- repository: 1es
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release

variables:
- template: /eng/ci/templates/variables/build.yml@self

extends:
template: v1/1ES.Unofficial.PipelineTemplate.yml@1es
parameters:
pool:
name: 1es-pool-azfunc-public
image: 1es-windows-2022
os: windows

sdl:
codeql:
compiled:
enabled: true
runSourceLanguagesInSourceAnalysis: true

settings:
# PR's from forks should not have permissions to set tags.
skipBuildTagsForGitHubPullRequests: ${{ variables['System.PullRequest.IsFork'] }}

stages:
- stage: Build & Test
jobs:
- template: /eng/ci/templates/build.yml@self # TODO: This also signs, refactor signing step out for speed
- template: /eng/ci/templates/test.yml@self
33 changes: 33 additions & 0 deletions eng/templates/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
jobs:
-job: RunTests
displayName: Run Tests

steps:
- bash: |
echo "Installing azurite"
npm install -g azurite
mkdir azurite1
echo "azurite installed"
azurite --silent --location azurite1 --debug azurite1\debug.txt --queuePort 10001 &
echo "azurite started"
sleep
displayName: 'Install and Run Azurite'
- task: VSTest@2
displayName: 'Run unit and functional tests'
inputs:
testAssemblyVer2: |
**\bin\Debug\net462\DurableTask.AzureStorage.Tests.dll
**\bin\Debug\net462\DurableTask.Core.Tests.dll
**\bin\Debug\net462\DurableTask.Emulator.Tests.dll
!**\obj\**
testFiltercriteria: 'TestCategory!=DisabledInCI'
vsTestVersion: 16.0
distributionBatchType: basedOnExecutionTime
platform: 'any cpu'
configuration: 'Debug'
diagnosticsEnabled: True
collectDumpOn: always
rerunFailedTests: true
rerunFailedThreshold: 20
rerunMaxAttempts: 2

0 comments on commit d4b98d4

Please sign in to comment.