Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add public build (first draft) #1134

Merged
merged 1 commit into from
Jul 12, 2024
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
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
Loading