following up after switching to gh action (#367)
* disable az pipeline * disable ci coverage report * do test before push * remove push nuget from travis * fix coverage ignore
This commit is contained in:
@@ -1,121 +0,0 @@
|
|||||||
jobs:
|
|
||||||
|
|
||||||
- job: xamarin_build
|
|
||||||
pool:
|
|
||||||
vmImage: 'VS2017-Win2016'
|
|
||||||
steps:
|
|
||||||
- task: MSBuild@1
|
|
||||||
displayName: 'NuGet restore'
|
|
||||||
inputs:
|
|
||||||
solution: '$(Build.SourcesDirectory)/src/KubernetesClient/KubernetesClient.csproj'
|
|
||||||
msbuildArguments: '/restore /p:Configuration=Release'
|
|
||||||
|
|
||||||
- task: MSBuild@1
|
|
||||||
displayName: 'MSBuild Pack'
|
|
||||||
inputs:
|
|
||||||
solution: '$(Build.SourcesDirectory)/src/KubernetesClient/KubernetesClient.csproj'
|
|
||||||
msbuildArguments: '/t:pack /p:Configuration=Release /p:PackageOutputPath="$(Build.ArtifactStagingDirectory)/nupkg/"'
|
|
||||||
|
|
||||||
- task: PublishBuildArtifacts@1
|
|
||||||
displayName: 'Publish Artifact: drop'
|
|
||||||
inputs:
|
|
||||||
PathtoPublish: '$(Build.ArtifactStagingDirectory)/nupkg/'
|
|
||||||
|
|
||||||
- job: windows_build
|
|
||||||
pool:
|
|
||||||
vmImage: 'VS2017-Win2016'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- task: DotNetCoreCLI@2
|
|
||||||
displayName: 'dotnet restore'
|
|
||||||
inputs:
|
|
||||||
command: restore
|
|
||||||
|
|
||||||
- task: DotNetCoreCLI@2
|
|
||||||
displayName: 'dotnet build'
|
|
||||||
inputs:
|
|
||||||
projects: '**/*.sln'
|
|
||||||
|
|
||||||
- task: DotNetCoreCLI@2
|
|
||||||
displayName: 'dotnet test'
|
|
||||||
inputs:
|
|
||||||
command: test
|
|
||||||
projects: tests\**\*.csproj
|
|
||||||
arguments: /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura
|
|
||||||
|
|
||||||
- task: PublishCodeCoverageResults@1
|
|
||||||
displayName: 'publish coverage results'
|
|
||||||
inputs:
|
|
||||||
codeCoverageTool: 'cobertura'
|
|
||||||
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.cobertura.xml'
|
|
||||||
|
|
||||||
# - task: alanwales.resharper-code-analysis.custom-build-task.ResharperCli@1
|
|
||||||
# displayName: 'Automated code quality checks'
|
|
||||||
# inputs:
|
|
||||||
# SolutionOrProjectPath: 'kubernetes-client.sln'
|
|
||||||
# FailBuildOnCodeIssues: false
|
|
||||||
# continueOnError: true
|
|
||||||
|
|
||||||
- task: DotNetCoreCLI@2
|
|
||||||
displayName: 'dotnet pack'
|
|
||||||
inputs:
|
|
||||||
command: pack
|
|
||||||
packagesToPack: src/KubernetesClient/KubernetesClient.csproj
|
|
||||||
packDirectory: '$(Build.ArtifactStagingDirectory)/nupkg'
|
|
||||||
|
|
||||||
- task: PublishBuildArtifacts@1
|
|
||||||
displayName: 'Publish Artifact: drop'
|
|
||||||
inputs:
|
|
||||||
PathtoPublish: '$(Build.ArtifactStagingDirectory)/nupkg'
|
|
||||||
|
|
||||||
- job: macos_build
|
|
||||||
pool:
|
|
||||||
vmImage: 'xcode9-macos10.13'
|
|
||||||
steps:
|
|
||||||
- script: |
|
|
||||||
brew install coreutils
|
|
||||||
which realpath
|
|
||||||
./ci.sh
|
|
||||||
displayName: 'Build & Test'
|
|
||||||
|
|
||||||
- task: PublishTestResults@1
|
|
||||||
displayName: 'Publish Test Results'
|
|
||||||
inputs:
|
|
||||||
testRunner: VSTest
|
|
||||||
testResultsFiles: '$(Build.SourcesDirectory)/tests/**/*.xunit.trx'
|
|
||||||
condition: succeededOrFailed()
|
|
||||||
|
|
||||||
- task: PublishCodeCoverageResults@1
|
|
||||||
displayName: 'publish coverage results'
|
|
||||||
inputs:
|
|
||||||
codeCoverageTool: 'cobertura'
|
|
||||||
summaryFileLocation: '$(Build.SourcesDirectory)/tests/coveragereport/Cobertura.xml'
|
|
||||||
reportDirectory: '$(Build.SourcesDirectory)/tests/coveragereport/'
|
|
||||||
condition: succeededOrFailed()
|
|
||||||
|
|
||||||
#- job: ubuntu_build
|
|
||||||
# pool:
|
|
||||||
# vmImage: 'ubuntu-16.04'
|
|
||||||
# steps:
|
|
||||||
# - script: |
|
|
||||||
# ./install-linux.sh
|
|
||||||
# displayName: 'Install .NET & set up minikube'
|
|
||||||
#
|
|
||||||
# - script: |
|
|
||||||
# ./ci.sh
|
|
||||||
# displayName: 'Build & Test'
|
|
||||||
#
|
|
||||||
# - task: PublishTestResults@1
|
|
||||||
# displayName: 'Publish Test Results'
|
|
||||||
# inputs:
|
|
||||||
# testRunner: VSTest
|
|
||||||
# testResultsFiles: '$(Build.SourcesDirectory)/tests/**/*.xunit.trx'
|
|
||||||
# condition: succeededOrFailed()
|
|
||||||
#
|
|
||||||
# - task: PublishCodeCoverageResults@1
|
|
||||||
# displayName: 'publish coverage results'
|
|
||||||
# inputs:
|
|
||||||
# codeCoverageTool: 'cobertura'
|
|
||||||
# summaryFileLocation: '$(Build.SourcesDirectory)/tests/coveragereport/Cobertura.xml'
|
|
||||||
# reportDirectory: '$(Build.SourcesDirectory)/tests/coveragereport/'
|
|
||||||
# condition: succeededOrFailed()
|
|
||||||
12
.github/workflows/dotnet.yaml
vendored
12
.github/workflows/dotnet.yaml
vendored
@@ -17,12 +17,12 @@ jobs:
|
|||||||
dotnet-version: 2.2.108
|
dotnet-version: 2.2.108
|
||||||
- run: dotnet build --configuration Release
|
- run: dotnet build --configuration Release
|
||||||
- name: test with dotnet
|
- name: test with dotnet
|
||||||
run: dotnet test /p:CollectCoverage=true /p:Exclude="[KubernetesClient]k8s.Models.*" /p:Exclude="[KubernetesClient]k8s.Internal.*" /p:CollectCoverage=true /p:CoverletOutputFormat="cobertura"
|
run: dotnet test /p:CollectCoverage=true /p:ExcludeByFile=\"**/KubernetesClient/generated/**/*.cs\" /p:CoverletOutputFormat="cobertura"
|
||||||
- uses: 5monkeys/cobertura-action@master
|
# - uses: 5monkeys/cobertura-action@master
|
||||||
with:
|
# with:
|
||||||
path: tests/KubernetesClient.Tests/coverage.netcoreapp2.1.cobertura.xml
|
# path: tests/KubernetesClient.Tests/coverage.netcoreapp2.1.cobertura.xml
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
# repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
minimum_coverage: 0
|
# minimum_coverage: 0
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|||||||
2
.github/workflows/nuget.yaml
vendored
2
.github/workflows/nuget.yaml
vendored
@@ -15,6 +15,8 @@ jobs:
|
|||||||
uses: actions/setup-dotnet@v1
|
uses: actions/setup-dotnet@v1
|
||||||
with:
|
with:
|
||||||
dotnet-version: 2.2.108
|
dotnet-version: 2.2.108
|
||||||
|
- name: test with dotnet
|
||||||
|
run: dotnet test
|
||||||
- name: pack
|
- name: pack
|
||||||
run: dotnet pack --configuration Release src/KubernetesClient -o pkg
|
run: dotnet pack --configuration Release src/KubernetesClient -o pkg
|
||||||
- name: push
|
- name: push
|
||||||
|
|||||||
14
.travis.yml
14
.travis.yml
@@ -36,10 +36,10 @@ script:
|
|||||||
after_script:
|
after_script:
|
||||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then ./integration-tests.sh; fi
|
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then ./integration-tests.sh; fi
|
||||||
|
|
||||||
deploy:
|
# deploy:
|
||||||
skip_cleanup: true
|
# skip_cleanup: true
|
||||||
provider: script
|
# provider: script
|
||||||
script: dotnet nuget push src/KubernetesClient/bin/Release/KubernetesClient.*.nupkg --api-key $NUGET_API_KEY --source $NUGET_SOURCE
|
# script: dotnet nuget push src/KubernetesClient/bin/Release/KubernetesClient.*.nupkg --api-key $NUGET_API_KEY --source $NUGET_SOURCE
|
||||||
on:
|
# on:
|
||||||
branch: master
|
# branch: master
|
||||||
condition: '"x${NUGET_API_KEY}" != "x" && "x$NUGET_SOURCE" != "x" && "$TRAVIS_OS_NAME" == "linux"'
|
# condition: '"x${NUGET_API_KEY}" != "x" && "x$NUGET_SOURCE" != "x" && "$TRAVIS_OS_NAME" == "linux"'
|
||||||
|
|||||||
Reference in New Issue
Block a user