Skip to content

Commit

Permalink
MNT Simplifies Azure pipeline linting (scikit-learn#17315)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjpfan authored and viclafargue committed Jun 26, 2020
1 parent 751d5bd commit 79ec4bb
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions azure-pipelines.yml
Expand Up @@ -13,35 +13,29 @@ jobs:
pool:
vmImage: ubuntu-18.04
steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH
- bash: sudo chown -R $USER $CONDA
displayName: Take ownership of conda installation
- task: UsePythonVersion@0
inputs:
versionSpec: '3.8'
- bash: |
set -ex
conda create --name flake8_env --yes python=3.8
source activate flake8_env
pip install flake8 mypy==0.770
displayName: Install flake8
displayName: Install linters
- bash: |
set -ex
if [[ $BUILD_SOURCEVERSIONMESSAGE =~ \[lint\ skip\] ]]; then
# skip linting
echo "Skipping linting"
echo "Skipping flake8 linting"
exit 0
else
source activate flake8_env
./build_tools/circle/linting.sh
fi
displayName: Run linting
- bash: |
set -ex
if [[ $BUILD_SOURCEVERSIONMESSAGE =~ \[lint\ skip\] ]]; then
# skip linting
echo "Skipping linting"
echo "Skipping mypy linting"
exit 0
else
source activate flake8_env
mypy sklearn/ --ignore-missing-imports
fi
displayName: Run mypy
Expand Down

0 comments on commit 79ec4bb

Please sign in to comment.