-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI with outerloop for e2e tests for all supported runtimes (#94)
* CI with outerloop for e2e tests for all supported runtimes * Specify docker images as resource Ah, too tired :-( * Don't use docker .NET SDK * Don't build as target for .NET 6 is missing in .NET Core 3.1 run
- Loading branch information
Showing
3 changed files
with
127 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
variables: | ||
DOTNET_NOLOGO: 1 | ||
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | ||
CI_BUILD_NUMBER: $(Build.BuildId) | ||
BRANCH_NAME: $(Build.SourceBranchName) | ||
TAG_NAME: $(Build.SourceBranchName) | ||
|
||
trigger: none | ||
# pr trigger must not be excluded, but in the UI for the pipeline definition a setting has to be made. | ||
# See https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/github?view=azure-devops&tabs=yaml#comment-triggers | ||
# for further info. | ||
|
||
schedules: | ||
- cron: "0 0 * * *" | ||
displayName: "Daily midnight build" | ||
branches: | ||
include: | ||
- master | ||
|
||
stages: | ||
- stage: Build_Test | ||
jobs: | ||
- template: jobs/build_and_test.yml | ||
|
||
- stage: E2E_Tests | ||
dependsOn: | ||
- Build_Test | ||
jobs: | ||
- template: jobs/e2e_tests_all.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
jobs: | ||
- job: e2e_tests | ||
displayName: e2e tests | ||
pool: | ||
vmImage: 'ubuntu-20.04' | ||
strategy: | ||
matrix: | ||
net60: | ||
dotnetVersion: '6.x' | ||
TRX2JUNIT_VECTORS_ENABLED: true | ||
net31: | ||
dotnetVersion: '3.1.x' | ||
steps: | ||
- task: UseDotNet@2 | ||
inputs: | ||
version: $(dotnetVersion) | ||
installationPath: $(Agent.ToolsDirectory)/dotnet | ||
includePreviewVersions: false | ||
|
||
- bash: | | ||
sudo apt update | ||
sudo apt install -y libxml2-utils | ||
displayName: install xml-lint | ||
- task: DownloadPipelineArtifact@2 | ||
inputs: | ||
artifactName: 'NuGet-Packed' | ||
targetPath: './NuGet-Packed' | ||
|
||
- bash: | | ||
chmod ugo+x -R *.sh | ||
chmod ugo+x ./tests/scripts/*.sh | ||
dotnet --info | ||
displayName: init | ||
- bash: | | ||
# copied from build.sh (but modified) | ||
if [[ -n "$TAG_NAME" ]]; then | ||
if [[ "$TAG_NAME" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)(-(preview-[0-9]+))?$ ]]; then | ||
export VersionMajor="${BASH_REMATCH[1]}" | ||
export VersionMinor="${BASH_REMATCH[2]}" | ||
export VersionPatch="${BASH_REMATCH[3]}" | ||
export VersionSuffix="${BASH_REMATCH[5]}" | ||
ToolVersion="$VersionMajor.$VersionMinor.$VersionPatch" | ||
if [[ -n $VersionSuffix ]]; then | ||
ToolVersion="$ToolVersion-$VersionSuffix" | ||
fi | ||
fi | ||
fi | ||
# special handling for pre-releases (is a constraint by .NET Core global tools) | ||
# and also to prevent installation from NuGet-feed (which may have higher version than the | ||
# built tool) | ||
if [[ -z "$ToolVersion" ]]; then | ||
dotnet tool install --tool-path $(pwd)/tool --configfile=ci-nuget.config trx2junit | ||
else | ||
dotnet tool install --tool-path $(pwd)/tool --version="$ToolVersion" --configfile=ci-nuget.config trx2junit | ||
fi | ||
echo "##vso[task.prependpath]$(pwd)/tool" | ||
displayName: install built trx2junit-tool | ||
- bash: | | ||
echo $PATH | ||
echo "-------------------------------------------------" | ||
dotnet tool list --tool-path $(pwd)/tool | ||
echo "-------------------------------------------------" | ||
trx2junit | ||
if [[ $? != 1 ]]; then | ||
echo "hm, something strange" | ||
exit 1 | ||
fi | ||
displayName: check tool installation | ||
- bash: ./tests/scripts/run-single-arg.sh | ||
displayName: single-arg | ||
|
||
- bash: ./tests/scripts/run-multiple-args.sh | ||
displayName: multiple-args | ||
|
||
- bash: ./tests/scripts/run-globbing.sh | ||
displayName: globbing | ||
|
||
- bash: ./tests/scripts/run-no-globbing.sh | ||
displayName: no-globbing | ||
|
||
- bash: ./tests/scripts/run-different-output-location.sh | ||
displayName: different-output-location | ||
|
||
- bash: ./tests/scripts/run-junit2trx.sh | ||
displayName: junit2trx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters