This repository has been archived by the owner on Jun 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.azure-pipelines.yml
71 lines (56 loc) · 1.75 KB
/
.azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Configuration for Azure Pipelines
########################################################################################
# Only build the master branch, tags, and PRs (on by default) to avoid building random
# branches in the repository until a PR is opened.
trigger:
branches:
include:
- master
- refs/tags/*
# Make sure triggers are set for PRs to any branch.
pr:
branches:
include:
- '*'
jobs:
# Style Checks on Linux
########################################################################################
- job:
displayName: 'Style Checks'
pool:
vmImage: 'ubuntu-16.04'
variables:
CONDA_INSTALL_EXTRA: "black flake8 pylint==2.4.*"
PYTHON: '3.7'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
- bash: echo "##vso[task.prependpath]/usr/share/miniconda/bin"
displayName: Add conda to PATH
# Get the Fatiando CI scripts
- bash: git clone --branch=1.2.0 --depth=1 https://github.com/fatiando/continuous-integration.git
displayName: Fetch the Fatiando CI scripts
# Setup dependencies and build a conda environment
- bash: source continuous-integration/azure/setup-miniconda.sh
displayName: Setup Miniconda
# Show installed pkg information for postmortem diagnostic
- bash: |
set -x -e
source activate testing
conda list
displayName: List installed packages
# Check that the code passes format checks
- bash: |
set -x -e
source activate testing
make check
displayName: Formatting check (black and flake8)
condition: succeededOrFailed()
# Check that the code passes linting checks
- bash: |
set -x -e
source activate testing
make lint
displayName: Linting (pylint)
condition: succeededOrFailed()