mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
Add cross platform automation tests
This commit is contained in:
parent
63a0147dc4
commit
a34140b7ad
1 changed files with 45 additions and 11 deletions
|
@ -67,12 +67,15 @@ stages:
|
||||||
displayName: Build Lidarr Backend
|
displayName: Build Lidarr Backend
|
||||||
- publish: $(outputFolder)
|
- publish: $(outputFolder)
|
||||||
artifact: '$(osName)Backend'
|
artifact: '$(osName)Backend'
|
||||||
|
displayName: Publish Backend
|
||||||
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||||
- publish: $(Build.SourcesDirectory)
|
- publish: $(Build.SourcesDirectory)
|
||||||
artifact: 'CoverageBuild'
|
artifact: 'CoverageBuild'
|
||||||
|
displayName: Publish Coverage Package
|
||||||
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||||
- publish: $(testsFolder)
|
- publish: $(testsFolder)
|
||||||
artifact: '$(osName)Tests'
|
artifact: '$(osName)Tests'
|
||||||
|
displayName: Publish Test Package
|
||||||
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||||
|
|
||||||
- stage: Build_Frontend
|
- stage: Build_Frontend
|
||||||
|
@ -107,6 +110,7 @@ stages:
|
||||||
FORCE_COLOR: 0
|
FORCE_COLOR: 0
|
||||||
- publish: $(outputFolder)
|
- publish: $(outputFolder)
|
||||||
artifact: '$(osName)Frontend'
|
artifact: '$(osName)Frontend'
|
||||||
|
displayName: Publish Frontend
|
||||||
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||||
|
|
||||||
- stage: Package
|
- stage: Package
|
||||||
|
@ -125,21 +129,25 @@ stages:
|
||||||
buildType: 'current'
|
buildType: 'current'
|
||||||
artifactName: WindowsBackend
|
artifactName: WindowsBackend
|
||||||
targetPath: _output
|
targetPath: _output
|
||||||
|
displayName: Fetch Backend
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
inputs:
|
inputs:
|
||||||
buildType: 'current'
|
buildType: 'current'
|
||||||
artifactName: WindowsFrontend
|
artifactName: WindowsFrontend
|
||||||
targetPath: _output
|
targetPath: _output
|
||||||
|
displayName: Fetch Frontend
|
||||||
- bash: ./build.sh --only-packages
|
- bash: ./build.sh --only-packages
|
||||||
displayName: Create Lidarr Packages
|
displayName: Create Packages
|
||||||
- bash: |
|
- bash: |
|
||||||
./setup/inno/ISCC.exe "./setup/lidarr.iss"
|
./setup/inno/ISCC.exe "./setup/lidarr.iss"
|
||||||
cp ./setup/output/Lidarr.*windows.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/${WINDOWSINSTALLER}
|
cp ./setup/output/Lidarr.*windows.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/${WINDOWSINSTALLER}
|
||||||
displayName: Create Windows installer
|
displayName: Create Windows installer
|
||||||
- publish: $(Build.ArtifactStagingDirectory)
|
- publish: $(Build.ArtifactStagingDirectory)
|
||||||
artifact: 'WindowsInstaller'
|
artifact: 'WindowsInstaller'
|
||||||
|
displayName: Publish Installer
|
||||||
|
|
||||||
- job: Other_Packages
|
- job: Other_Packages
|
||||||
|
dependsOn: Windows_Installer
|
||||||
displayName: Create Standard Packages
|
displayName: Create Standard Packages
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'ubuntu-16.04'
|
vmImage: 'ubuntu-16.04'
|
||||||
|
@ -150,18 +158,21 @@ stages:
|
||||||
buildType: 'current'
|
buildType: 'current'
|
||||||
artifactName: WindowsBackend
|
artifactName: WindowsBackend
|
||||||
targetPath: _output
|
targetPath: _output
|
||||||
|
displayName: Fetch Backend
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
inputs:
|
inputs:
|
||||||
buildType: 'current'
|
buildType: 'current'
|
||||||
artifactName: WindowsFrontend
|
artifactName: WindowsFrontend
|
||||||
targetPath: _output
|
targetPath: _output
|
||||||
|
displayName: Fetch Frontend
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
inputs:
|
inputs:
|
||||||
buildType: 'current'
|
buildType: 'current'
|
||||||
artifactName: WindowsInstaller
|
artifactName: WindowsInstaller
|
||||||
targetPath: $(Build.ArtifactStagingDirectory)
|
targetPath: $(Build.ArtifactStagingDirectory)
|
||||||
|
displayName: Fetch Installer
|
||||||
- bash: ./build.sh --only-packages
|
- bash: ./build.sh --only-packages
|
||||||
displayName: Create Lidarr Packages
|
displayName: Create Packages
|
||||||
- bash: |
|
- bash: |
|
||||||
chmod a+x $(artifactsFolder)/macos/fpcalc
|
chmod a+x $(artifactsFolder)/macos/fpcalc
|
||||||
chmod a+x $(artifactsFolder)/macos-app/fpcalc
|
chmod a+x $(artifactsFolder)/macos-app/fpcalc
|
||||||
|
@ -198,6 +209,7 @@ stages:
|
||||||
rootFolderOrFile: $(artifactsFolder)/linux
|
rootFolderOrFile: $(artifactsFolder)/linux
|
||||||
- publish: $(Build.ArtifactStagingDirectory)
|
- publish: $(Build.ArtifactStagingDirectory)
|
||||||
artifact: 'Packages'
|
artifact: 'Packages'
|
||||||
|
displayName: Publish Packages
|
||||||
- bash: |
|
- bash: |
|
||||||
echo "Uploading source maps to sentry"
|
echo "Uploading source maps to sentry"
|
||||||
yarn sentry-cli releases new --finalize -p lidarr -p lidarr-ui -p lidarr-update "${LIDARRVERSION}-debug"
|
yarn sentry-cli releases new --finalize -p lidarr -p lidarr-ui -p lidarr-update "${LIDARRVERSION}-debug"
|
||||||
|
@ -244,10 +256,12 @@ stages:
|
||||||
displayName: Install fpcalc
|
displayName: Install fpcalc
|
||||||
condition: and(succeeded(), eq(variables['osName'], 'Linux'))
|
condition: and(succeeded(), eq(variables['osName'], 'Linux'))
|
||||||
- powershell: Set-Service SCardSvr -StartupType Manual
|
- powershell: Set-Service SCardSvr -StartupType Manual
|
||||||
|
displayName: Enable Windows Test Service
|
||||||
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||||
- bash: |
|
- bash: |
|
||||||
chmod a+x _tests/fpcalc
|
chmod a+x _tests/fpcalc
|
||||||
export DYLD_FALLBACK_LIBRARY_PATH=${BUILD_SOURCESDIRECTORY}/_tests
|
export DYLD_FALLBACK_LIBRARY_PATH=${BUILD_SOURCESDIRECTORY}/_tests
|
||||||
|
displayName: Make fpcalc Executable
|
||||||
condition: and(succeeded(), eq(variables['osName'], 'Mac'))
|
condition: and(succeeded(), eq(variables['osName'], 'Mac'))
|
||||||
- task: Bash@3
|
- task: Bash@3
|
||||||
displayName: Run Tests
|
displayName: Run Tests
|
||||||
|
@ -313,9 +327,11 @@ stages:
|
||||||
inputs:
|
inputs:
|
||||||
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
||||||
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
||||||
|
displayName: Extract Package
|
||||||
- bash: |
|
- bash: |
|
||||||
mkdir ./bin
|
mkdir ./bin
|
||||||
cp -R -v ${BUILD_ARTIFACTSTAGINGDIRECTORY}/bin/Lidarr/* ./bin
|
cp -R -v ${BUILD_ARTIFACTSTAGINGDIRECTORY}/bin/Lidarr/* ./bin
|
||||||
|
displayName: Move Package Contents
|
||||||
- task: Bash@3
|
- task: Bash@3
|
||||||
displayName: Run Integration Tests
|
displayName: Run Integration Tests
|
||||||
inputs:
|
inputs:
|
||||||
|
@ -327,6 +343,7 @@ stages:
|
||||||
testResultsFormat: 'NUnit'
|
testResultsFormat: 'NUnit'
|
||||||
testResultsFiles: '**/TestResult.xml'
|
testResultsFiles: '**/TestResult.xml'
|
||||||
testRunTitle: '$(osName) Integration Tests'
|
testRunTitle: '$(osName) Integration Tests'
|
||||||
|
displayName: Publish Test Results
|
||||||
|
|
||||||
# - job: Windows_Integration_Tests
|
# - job: Windows_Integration_Tests
|
||||||
# displayName: Windows Integration
|
# displayName: Windows Integration
|
||||||
|
@ -371,10 +388,25 @@ stages:
|
||||||
# testResultsFiles: '**/TestResult.xml'
|
# testResultsFiles: '**/TestResult.xml'
|
||||||
# testRunTitle: 'Windows Integration Tests'
|
# testRunTitle: 'Windows Integration Tests'
|
||||||
|
|
||||||
- job: Windows_Automation_Tests
|
- job: Automation
|
||||||
displayName: Windows 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:
|
pool:
|
||||||
vmImage: 'vs2017-win2016'
|
vmImage: $(imageName)
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- checkout: self
|
- checkout: self
|
||||||
- task: DownloadPipelineArtifact@2
|
- task: DownloadPipelineArtifact@2
|
||||||
|
@ -388,27 +420,29 @@ stages:
|
||||||
inputs:
|
inputs:
|
||||||
buildType: 'current'
|
buildType: 'current'
|
||||||
artifactName: Packages
|
artifactName: Packages
|
||||||
itemPattern: '**\Lidarr.**.windows.zip'
|
itemPattern: '**/$(pattern)'
|
||||||
targetPath: $(Build.ArtifactStagingDirectory)
|
targetPath: $(Build.ArtifactStagingDirectory)
|
||||||
- task: ExtractFiles@1
|
- task: ExtractFiles@1
|
||||||
inputs:
|
inputs:
|
||||||
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/Lidarr.**.windows.zip'
|
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/**/$(pattern)'
|
||||||
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
destinationFolder: '$(Build.ArtifactStagingDirectory)/bin'
|
||||||
|
displayName: Extract Package
|
||||||
- bash: |
|
- bash: |
|
||||||
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
|
||||||
- task: Bash@3
|
- task: Bash@3
|
||||||
displayName: Windows Automation Tests
|
displayName: Run Automation Tests
|
||||||
inputs:
|
inputs:
|
||||||
targetType: 'filePath'
|
targetType: 'filePath'
|
||||||
filePath: ./test.sh
|
filePath: ./test.sh
|
||||||
arguments: Windows 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: 'Windows Automation Tests'
|
testRunTitle: '($osName) Automation Tests'
|
||||||
|
displayName: Publish Test Results
|
||||||
|
|
||||||
- stage: Coverage
|
- stage: Coverage
|
||||||
dependsOn: Build_Backend
|
dependsOn: Build_Backend
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue