Fix azure-pipelines.yml to use ubuntu-18.04 (#371)

This commit is contained in:
EJ Song 2021-03-02 19:20:13 -08:00 коммит произвёл GitHub
Родитель 66076e0fa4
Коммит 2b229d4505
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 23 добавлений и 6 удалений

Просмотреть файл

@ -9,8 +9,14 @@ jobs:
- job: Build_2_11
displayName: 'Build sources and run unit tests for Scala 2.11'
pool:
vmImage: 'ubuntu-latest'
vmImage: 'ubuntu-18.04'
steps:
- task: JavaToolInstaller@0
displayName: 'Set Java version'
inputs:
versionSpec: '8'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'PreInstalled'
- script: sbt ++2.11.12 clean
displayName: 'Running $sbt clean'
- script: sbt ++2.11.12 update
@ -38,7 +44,7 @@ jobs:
- job: Build_2_12
displayName: 'Build sources and run unit tests for Scala 2.12'
pool:
vmImage: 'ubuntu-latest'
vmImage: 'ubuntu-18.04'
steps:
- script: sbt ++2.12.8 clean
displayName: 'Running $sbt clean'
@ -67,8 +73,19 @@ jobs:
- job: PythonTest
displayName: 'Run Python tests'
pool:
vmImage: 'ubuntu-latest'
vmImage: 'ubuntu-18.04'
steps:
- task: UsePythonVersion@0
displayName: 'Set Python version'
inputs:
versionSpec: '2.7'
addToPath: true
- task: JavaToolInstaller@0
displayName: 'Set Java version'
inputs:
versionSpec: '8'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'PreInstalled'
- script: sbt ++2.11.12 clean
displayName: 'Running $sbt clean'
- script: sbt ++2.11.12 update

Просмотреть файл

@ -56,7 +56,7 @@ def test(root_dir, package):
extra_class_path = path.join(python_root_dir, path.join("hyperspace", "testing"))
for test_file in test_files:
try:
if environ.get('SPARK_HOME') is None:
if environ.get('SPARK_HOME') == None:
print("SPARK_HOME is not set in the environment variables.")
sys.exit(1)
my_env = os.environ.copy()
@ -112,7 +112,7 @@ def run_cmd(cmd, throw_on_error=True, env=None, stream_output=False, **kwargs):
**kwargs)
(stdout, stderr) = child.communicate()
exit_code = child.wait()
if throw_on_error and exit_code is not 0:
if throw_on_error and exit_code != 0:
raise Exception(
"Non-zero exitcode: %s\n\nSTDOUT:\n%s\n\nSTDERR:%s" %
(exit_code, stdout, stderr))

Просмотреть файл

@ -72,7 +72,7 @@ def run_cmd(cmd, throw_on_error=True, env=None, stream_output=False, **kwargs):
**kwargs)
(stdout, stderr) = child.communicate()
exit_code = child.wait()
if throw_on_error and exit_code is not 0:
if throw_on_error and exit_code != 0:
raise Exception(
"Non-zero exitcode: %s\n\nSTDOUT:\n%s\n\nSTDERR:%s" %
(exit_code, stdout, stderr))