mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
Try to fix Automation tests
This commit is contained in:
parent
31ad481b81
commit
ac55f99559
3 changed files with 82 additions and 105 deletions
|
@ -1,7 +1,6 @@
|
||||||
# Lidarr
|
# Lidarr
|
||||||
|
|
||||||
[](https://ci.appveyor.com/project/lidarr/lidarr)
|
[](https://dev.azure.com/Lidarr/Lidarr/_build/latest?definitionId=1&branchName=develop)
|
||||||
[](https://www.codacy.com/app/Lidarr/Lidarr?utm_source=github.com&utm_medium=referral&utm_content=lidarr/Lidarr&utm_campaign=Badge_Grade)
|
|
||||||
[](https://github.com/lidarr/Lidarr/wiki/Docker)
|
[](https://github.com/lidarr/Lidarr/wiki/Docker)
|
||||||

|

|
||||||
[](#backers) [](#sponsors)
|
[](#backers) [](#sponsors)
|
||||||
|
|
|
@ -52,6 +52,7 @@ stages:
|
||||||
displayName: Set Build Name
|
displayName: Set Build Name
|
||||||
- checkout: self
|
- checkout: self
|
||||||
submodules: true
|
submodules: true
|
||||||
|
fetchDepth: 1
|
||||||
- task: Assembly-Info-NetFramework@2
|
- task: Assembly-Info-NetFramework@2
|
||||||
displayName: Patch AssemblyInfo
|
displayName: Patch AssemblyInfo
|
||||||
inputs:
|
inputs:
|
||||||
|
@ -104,6 +105,7 @@ stages:
|
||||||
versionSpec: '10.x'
|
versionSpec: '10.x'
|
||||||
- checkout: self
|
- checkout: self
|
||||||
submodules: true
|
submodules: true
|
||||||
|
fetchDepth: 1
|
||||||
- bash: ./build.sh --only-frontend
|
- bash: ./build.sh --only-frontend
|
||||||
displayName: Build Lidarr Frontend
|
displayName: Build Lidarr Frontend
|
||||||
env:
|
env:
|
||||||
|
@ -124,6 +126,7 @@ stages:
|
||||||
vmImage: 'vs2017-win2016'
|
vmImage: 'vs2017-win2016'
|
||||||
steps:
|
steps:
|
||||||
- checkout: self
|
- checkout: self
|
||||||
|
fetchDepth: 1
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
inputs:
|
inputs:
|
||||||
buildType: 'current'
|
buildType: 'current'
|
||||||
|
@ -154,6 +157,7 @@ stages:
|
||||||
steps:
|
steps:
|
||||||
- bash: sudo apt install dos2unix
|
- bash: sudo apt install dos2unix
|
||||||
- checkout: self
|
- checkout: self
|
||||||
|
fetchDepth: 1
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
inputs:
|
inputs:
|
||||||
buildType: 'current'
|
buildType: 'current'
|
||||||
|
@ -312,106 +316,7 @@ stages:
|
||||||
sudo tar xf chromaprint-fpcalc-1.4.3-linux-x86_64.tar.gz --strip-components=1 --directory /usr/bin
|
sudo tar xf chromaprint-fpcalc-1.4.3-linux-x86_64.tar.gz --strip-components=1 --directory /usr/bin
|
||||||
displayName: Install fpcalc
|
displayName: Install fpcalc
|
||||||
condition: and(succeeded(), eq(variables['osName'], 'Linux'))
|
condition: and(succeeded(), eq(variables['osName'], 'Linux'))
|
||||||
- checkout: self
|
- checkout: none
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: Download Test Artifact
|
|
||||||
inputs:
|
|
||||||
buildType: 'current'
|
|
||||||
artifactName: WindowsTests
|
|
||||||
targetPath: $(testsFolder)
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
displayName: Download Build Artifact
|
|
||||||
inputs:
|
|
||||||
buildType: 'current'
|
|
||||||
artifactName: Packages
|
|
||||||
itemPattern: '**/$(pattern)'
|
|
||||||
targetPath: $(Build.ArtifactStagingDirectory)
|
|
||||||
- task: ExtractFiles@1
|
|
||||||
inputs:
|
|
||||||
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
|
||||||
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
|
||||||
displayName: Extract Package
|
|
||||||
- bash: |
|
|
||||||
mkdir ./bin
|
|
||||||
cp -R -v ${BUILD_ARTIFACTSTAGINGDIRECTORY}/bin/Lidarr/* ./bin
|
|
||||||
displayName: Move Package Contents
|
|
||||||
- task: Bash@3
|
|
||||||
displayName: Run Integration Tests
|
|
||||||
inputs:
|
|
||||||
targetType: 'filePath'
|
|
||||||
filePath: ./test.sh
|
|
||||||
arguments: $(osName) Integration Test
|
|
||||||
- task: PublishTestResults@2
|
|
||||||
inputs:
|
|
||||||
testResultsFormat: 'NUnit'
|
|
||||||
testResultsFiles: '**/TestResult.xml'
|
|
||||||
testRunTitle: '$(osName) Integration Tests'
|
|
||||||
displayName: Publish Test Results
|
|
||||||
|
|
||||||
# - job: Windows_Integration_Tests
|
|
||||||
# displayName: Windows Integration
|
|
||||||
# pool:
|
|
||||||
# vmImage: 'vs2017-win2016'
|
|
||||||
# steps:
|
|
||||||
# - script: |
|
|
||||||
# wget https://github.com/acoustid/chromaprint/releases/download/v1.4.3/chromaprint-fpcalc-1.4.3-linux-x86_64.tar.gz
|
|
||||||
# sudo tar xf chromaprint-fpcalc-1.4.3-linux-x86_64.tar.gz --strip-components=1 --directory /usr/bin
|
|
||||||
# displayName: Install fpcalc
|
|
||||||
# condition: and(succeeded(), eq(variables['osName'], 'Linux'))
|
|
||||||
# - checkout: self
|
|
||||||
# - task: DownloadPipelineArtifact@2
|
|
||||||
# displayName: Download Test Artifact
|
|
||||||
# inputs:
|
|
||||||
# buildType: 'current'
|
|
||||||
# artifactName: WindowsTests
|
|
||||||
# targetPath: $(testsFolder)
|
|
||||||
# - task: DownloadPipelineArtifact@2
|
|
||||||
# displayName: Download Build Artifact
|
|
||||||
# inputs:
|
|
||||||
# buildType: 'current'
|
|
||||||
# artifactName: Packages
|
|
||||||
# itemPattern: '**\Lidarr.**.windows.zip'
|
|
||||||
# targetPath: $(Build.ArtifactStagingDirectory)
|
|
||||||
# - task: ExtractFiles@1
|
|
||||||
# inputs:
|
|
||||||
# archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/Lidarr.**.windows.zip'
|
|
||||||
# destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
|
||||||
# - bash: |
|
|
||||||
# mkdir -p ./bin/
|
|
||||||
# cp -r -v ${BUILD_ARTIFACTSTAGINGDIRECTORY}/bin/Lidarr/. ./bin/
|
|
||||||
# - task: Bash@3
|
|
||||||
# displayName: Windows Integration Tests
|
|
||||||
# inputs:
|
|
||||||
# targetType: 'filePath'
|
|
||||||
# filePath: ./test.sh
|
|
||||||
# arguments: Windows Integration Test
|
|
||||||
# - task: PublishTestResults@2
|
|
||||||
# inputs:
|
|
||||||
# testResultsFormat: 'NUnit'
|
|
||||||
# testResultsFiles: '**/TestResult.xml'
|
|
||||||
# testRunTitle: 'Windows Integration Tests'
|
|
||||||
|
|
||||||
- job: Automation
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
Linux:
|
|
||||||
osName: 'Linux'
|
|
||||||
imageName: 'ubuntu-16.04'
|
|
||||||
pattern: 'Lidarr.**.linux.tar.gz'
|
|
||||||
Mac:
|
|
||||||
osName: 'Mac'
|
|
||||||
imageName: 'macos-10.13'
|
|
||||||
pattern: 'Lidarr.**.osx.tar.gz'
|
|
||||||
Windows:
|
|
||||||
osName: 'Windows'
|
|
||||||
imageName: 'vs2017-win2016'
|
|
||||||
pattern: 'Lidarr.**.windows.zip'
|
|
||||||
|
|
||||||
pool:
|
|
||||||
vmImage: $(imageName)
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- checkout: self
|
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
displayName: Download Test Artifact
|
displayName: Download Test Artifact
|
||||||
inputs:
|
inputs:
|
||||||
|
@ -434,17 +339,89 @@ stages:
|
||||||
mkdir -p ./bin/
|
mkdir -p ./bin/
|
||||||
cp -r -v ${BUILD_ARTIFACTSTAGINGDIRECTORY}/bin/Lidarr/. ./bin/
|
cp -r -v ${BUILD_ARTIFACTSTAGINGDIRECTORY}/bin/Lidarr/. ./bin/
|
||||||
displayName: Move Package Contents
|
displayName: Move Package Contents
|
||||||
|
- task: Bash@3
|
||||||
|
displayName: Run Integration Tests
|
||||||
|
inputs:
|
||||||
|
targetType: 'filePath'
|
||||||
|
filePath: '$(testsFolder)/test.sh'
|
||||||
|
arguments: $(osName) Integration Test
|
||||||
|
- task: PublishTestResults@2
|
||||||
|
inputs:
|
||||||
|
testResultsFormat: 'NUnit'
|
||||||
|
testResultsFiles: '**/TestResult.xml'
|
||||||
|
testRunTitle: '$(osName) Integration Tests'
|
||||||
|
displayName: Publish Test Results
|
||||||
|
|
||||||
|
- job: Automation
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
Linux:
|
||||||
|
osName: 'Linux'
|
||||||
|
imageName: 'ubuntu-16.04'
|
||||||
|
pattern: 'Lidarr.**.linux.tar.gz'
|
||||||
|
Mac:
|
||||||
|
osName: 'Mac'
|
||||||
|
imageName: 'macos-10.13'
|
||||||
|
pattern: 'Lidarr.**.osx.tar.gz'
|
||||||
|
Windows:
|
||||||
|
osName: 'Windows'
|
||||||
|
imageName: 'vs2017-win2016'
|
||||||
|
pattern: 'Lidarr.**.windows.zip'
|
||||||
|
|
||||||
|
pool:
|
||||||
|
vmImage: $(imageName)
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- checkout: none
|
||||||
|
- task: DownloadPipelineArtifact@2
|
||||||
|
displayName: Download Test Artifact
|
||||||
|
inputs:
|
||||||
|
buildType: 'current'
|
||||||
|
artifactName: WindowsTests
|
||||||
|
targetPath: $(testsFolder)
|
||||||
|
- task: DownloadPipelineArtifact@2
|
||||||
|
displayName: Download Build Artifact
|
||||||
|
inputs:
|
||||||
|
buildType: 'current'
|
||||||
|
artifactName: Packages
|
||||||
|
itemPattern: '**/$(pattern)'
|
||||||
|
targetPath: $(Build.ArtifactStagingDirectory)
|
||||||
|
- task: ExtractFiles@1
|
||||||
|
inputs:
|
||||||
|
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
||||||
|
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
||||||
|
displayName: Extract Package
|
||||||
|
- bash: |
|
||||||
|
mkdir -p ./bin/
|
||||||
|
cp -r -v ${BUILD_ARTIFACTSTAGINGDIRECTORY}/bin/Lidarr/. ./bin/
|
||||||
|
displayName: Move Package Contents
|
||||||
|
- bash: |
|
||||||
|
json=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest)
|
||||||
|
if [[ $OSNAME == "Mac" ]]; then
|
||||||
|
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("macos"))')
|
||||||
|
elif [[ $OSNAME == "Linux" ]]; then
|
||||||
|
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("linux64"))')
|
||||||
|
else
|
||||||
|
echo "Unhandled OS"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
curl -s -L "$url" | tar -xz
|
||||||
|
chmod +x geckodriver
|
||||||
|
mv geckodriver _tests
|
||||||
|
displayName: Install Gecko Driver
|
||||||
|
condition: and(succeeded(), ne(variables['osName'], 'Windows'))
|
||||||
|
- bash: ls -lR
|
||||||
- task: Bash@3
|
- task: Bash@3
|
||||||
displayName: Run Automation Tests
|
displayName: Run Automation Tests
|
||||||
inputs:
|
inputs:
|
||||||
targetType: 'filePath'
|
targetType: 'filePath'
|
||||||
filePath: ./test.sh
|
filePath: '$(testsFolder)/test.sh'
|
||||||
arguments: $(osName) Automation Test
|
arguments: $(osName) Automation Test
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
inputs:
|
inputs:
|
||||||
testResultsFormat: 'NUnit'
|
testResultsFormat: 'NUnit'
|
||||||
testResultsFiles: '**/TestResult.xml'
|
testResultsFiles: '**/TestResult.xml'
|
||||||
testRunTitle: '($osName) Automation Tests'
|
testRunTitle: '$(osName) Automation Tests'
|
||||||
displayName: Publish Test Results
|
displayName: Publish Test Results
|
||||||
|
|
||||||
- stage: Coverage
|
- stage: Coverage
|
||||||
|
|
3
test.sh
3
test.sh
|
@ -56,7 +56,8 @@ if [ "$PLATFORM" = "Mac" ]; then
|
||||||
echo $DYLD_LIBRARY_PATH
|
echo $DYLD_LIBRARY_PATH
|
||||||
echo $DYLD_FALLBACK_LIBRARY_PATH
|
echo $DYLD_FALLBACK_LIBRARY_PATH
|
||||||
|
|
||||||
export DYLD_PRINT_LIBRARIES=YES
|
# To debug which libraries are being loaded:
|
||||||
|
# export DYLD_PRINT_LIBRARIES=YES
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$PLATFORM" = "Windows" ]; then
|
if [ "$PLATFORM" = "Windows" ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue