Update CI: update ubuntu image, add download test (#8298)

* Update CI: update ubuntu image, add download test

* Switch instances to `ubuntu-18.04`
* Add model download test, currently only for one job with python 3.8

* Fix variable name

* Set variables explicitly
This commit is contained in:
Adriane Boyd 2021-06-07 14:46:07 +02:00 committed by GitHub
parent f34dd0b98f
commit d52ab13b5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 5 deletions

View File

@ -11,6 +11,10 @@ steps:
versionSpec: ${{ parameters.python_version }} versionSpec: ${{ parameters.python_version }}
architecture: ${{ parameters.architecture }} architecture: ${{ parameters.architecture }}
- bash: |
echo "##vso[task.setvariable variable=python_version]${{ parameters.python_version }}"
displayName: 'Set variables'
- script: | - script: |
${{ parameters.prefix }} python -m pip install -U pip setuptools ${{ parameters.prefix }} python -m pip install -U pip setuptools
${{ parameters.prefix }} python -m pip install -U -r requirements.txt ${{ parameters.prefix }} python -m pip install -U -r requirements.txt
@ -55,3 +59,9 @@ steps:
${{ parameters.prefix }} python -m pytest --pyargs spacy -p spacy.tests.enable_gpu ${{ parameters.prefix }} python -m pytest --pyargs spacy -p spacy.tests.enable_gpu
displayName: "Run GPU tests" displayName: "Run GPU tests"
condition: eq(${{ parameters.gpu }}, true) condition: eq(${{ parameters.gpu }}, true)
- script: |
python -m spacy download en_core_web_sm
python -c "import spacy; nlp=spacy.load('en_core_web_sm'); doc=nlp('test')"
displayName: 'Test download CLI'
condition: eq(variables['python_version'], '3.8')

View File

@ -22,7 +22,7 @@ jobs:
# defined in .flake8 and overwrites the selected codes. # defined in .flake8 and overwrites the selected codes.
- job: "Validate" - job: "Validate"
pool: pool:
vmImage: "ubuntu-16.04" vmImage: "ubuntu-18.04"
steps: steps:
- task: UsePythonVersion@0 - task: UsePythonVersion@0
inputs: inputs:
@ -38,7 +38,7 @@ jobs:
matrix: matrix:
# We're only running one platform per Python version to speed up builds # We're only running one platform per Python version to speed up builds
Python36Linux: Python36Linux:
imageName: "ubuntu-16.04" imageName: "ubuntu-18.04"
python.version: "3.6" python.version: "3.6"
# Python36Windows: # Python36Windows:
# imageName: "vs2017-win2016" # imageName: "vs2017-win2016"
@ -47,7 +47,7 @@ jobs:
# imageName: "macos-10.14" # imageName: "macos-10.14"
# python.version: "3.6" # python.version: "3.6"
# Python37Linux: # Python37Linux:
# imageName: "ubuntu-16.04" # imageName: "ubuntu-18.04"
# python.version: "3.7" # python.version: "3.7"
Python37Windows: Python37Windows:
imageName: "vs2017-win2016" imageName: "vs2017-win2016"
@ -56,7 +56,7 @@ jobs:
# imageName: "macos-10.14" # imageName: "macos-10.14"
# python.version: "3.7" # python.version: "3.7"
# Python38Linux: # Python38Linux:
# imageName: "ubuntu-16.04" # imageName: "ubuntu-18.04"
# python.version: "3.8" # python.version: "3.8"
# Python38Windows: # Python38Windows:
# imageName: "vs2017-win2016" # imageName: "vs2017-win2016"
@ -65,7 +65,7 @@ jobs:
imageName: "macos-10.14" imageName: "macos-10.14"
python.version: "3.8" python.version: "3.8"
Python39Linux: Python39Linux:
imageName: "ubuntu-16.04" imageName: "ubuntu-18.04"
python.version: "3.9" python.version: "3.9"
Python39Windows: Python39Windows:
imageName: "vs2017-win2016" imageName: "vs2017-win2016"