Skip to content

Commit

Permalink
Adding hardware test (#351)
Browse files Browse the repository at this point in the history
Co-authored-by: José Simões <[email protected]>
  • Loading branch information
Ellerbach and josesimoes authored Dec 26, 2024
1 parent eb4c259 commit 8a1dca0
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 37 deletions.
42 changes: 42 additions & 0 deletions azure-bootstrap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright (c) .NET Foundation and Contributors
# See LICENSE file in the project root for full license information.

trigger:
branches:
include:
- main
- develop
- release-*
paths:
exclude:
- .gitignore
- CHANGELOG.md
- LICENSE.md
- README.md
- NuGet.Config
- assets/*
- .github/*

# PR always trigger build
pr:
autoCancel: true

# add nf-tools repo to resources (for Azure Pipelines templates)
resources:
repositories:
- repository: templates
type: github
name: nanoframework/nf-tools
endpoint: nanoframework

jobs:
- job: Trigger
displayName: Trigger Azure Dev Ops build and test pipeline
pool:
vmImage: 'ubuntu-latest'

steps:
- template: azure-pipelines-templates/device-bootstrap.yml@templates
parameters:
AZURE_DEVOPS_PROJECT: nanoFramework.Json
AZURE_DEVOPS_PIPELINE_ID: 59
85 changes: 48 additions & 37 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,10 @@
# Copyright (c) .NET Foundation and Contributors
# See LICENSE file in the project root for full license information.

trigger:
branches:
include:
- main
- develop
- release-*
paths:
exclude:
- .github_changelog_generator
- .gitignore
- CHANGELOG.md
- CODE_OF_CONDUCT.md
- LICENSE.md
- README.md
- NuGet.Config
- assets/*
- config/*
- .github/*

# PR always trigger build
pr:
autoCancel: true
# The Pipeline is going to be triggered by a call to Azure DevOps REST API
# Manual trigger is always possible.
trigger: none
pr: none

# add nf-tools repo to resources (for Azure Pipelines templates)
resources:
Expand All @@ -48,20 +30,49 @@ variables:
- name: nugetPackageName
value: 'nanoFramework.Json'

steps:
parameters:
- name: appComponents
displayName: List of capabilities to run the tests on
type: object
default:
- none

stages:
- stage: Build
displayName: 'Build'
jobs:
- job: Build
displayName: 'Build job'
pool:
# default is the following VM Image
vmImage: 'windows-latest'
steps:

# step from template @ nf-tools repo
# all build, update and publish steps
- template: azure-pipelines-templates/class-lib-build.yml@templates
parameters:
sonarCloudProject: 'nanoframework_lib-nanoFramework.Json'
runUnitTests: true
unitTestRunsettings: '$(System.DefaultWorkingDirectory)\.runsettings'

# step from template @ nf-tools repo
# report error
- template: azure-pipelines-templates/discord-webhook-task.yml@templates
parameters:
status: 'failure'
webhookUrl: '$(DiscordWebhook)'
message: ''

# step from template @ nf-tools repo
# all build, update and publish steps
- template: azure-pipelines-templates/class-lib-build.yml@templates
parameters:
sonarCloudProject: 'nanoframework_lib-nanoFramework.Json'
runUnitTests: true
unitTestRunsettings: '$(System.DefaultWorkingDirectory)\.runsettings'
- task: PublishPipelineArtifact@1
displayName: Publish Pipeline Artifact copy
inputs:
path: '$(System.DefaultWorkingDirectory)'
artifactName: 'Artifacts'

# step from template @ nf-tools repo
# report error
- template: azure-pipelines-templates/discord-webhook-task.yml@templates
parameters:
status: 'failure'
webhookUrl: '$(DiscordWebhook)'
message: ''
- ${{ each appComponents in parameters.appComponents }}:
- template: azure-pipelines-templates/device-test.yml@templates
parameters:
appComponents: ${{ appComponents }}
unitTestRunsettings:
- 'nanoFramework.Json.Test/nano.runsettings,nanoFramework.Json.Test/bin/Release/NFUnitTest.dll'
1 change: 1 addition & 0 deletions nanoFramework.Json.Test/nano.runsettings
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
<nanoFrameworkAdapter>
<Logging>None</Logging>
<IsRealHardware>False</IsRealHardware>
<RealHardwarePort>COM3</RealHardwarePort>
</nanoFrameworkAdapter>
</RunSettings>

0 comments on commit 8a1dca0

Please sign in to comment.