Skip to content

Commit 203f02e

Browse files
committed
Split CI scripts into separate commands
This will allow each wpiformat invocation to cause a CI failure instead of just the last one.
1 parent 8b23b3b commit 203f02e

File tree

1 file changed

+36
-28
lines changed

1 file changed

+36
-28
lines changed

azure-pipelines.yml

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -32,34 +32,38 @@ jobs:
3232
sudo python3 setup.py install --optimize=1 --skip-build
3333
displayName: 'Build'
3434
- script: |
35-
# Make sure .git/refs/heads/master exists
3635
git config --global user.email "[email protected]"
3736
git config --global user.name "Your Name"
3837
git checkout -b pr
3938
git checkout master
4039
git checkout pr
41-
40+
displayName: 'Make sure .git/refs/heads/master exists'
41+
- script: |
4242
cd wpiformat
4343
python3 setup.py test
44-
cd ..
45-
44+
displayName: 'Run unit tests'
45+
- script: |
4646
python3 -m wpiformat -v
47+
displayName: 'Run wpiformat'
48+
- script: |
4749
cd wpiformat
48-
# One file
4950
python3 -m wpiformat -f wpiformat/__init__.py -v
50-
51-
# Absolute path to file
51+
displayName: 'One file'
52+
- script: |
53+
cd wpiformat
5254
python3 -m wpiformat -f /__w/1/s/wpiformat/wpiformat/__init__.py -v
53-
54-
# Multiple files
55+
displayName: 'Absolute path to file'
56+
- script: |
57+
cd wpiformat
5558
python3 -m wpiformat -f wpiformat/__init__.py wpiformat/__main__.py -v
56-
57-
# Directory
59+
displayName: 'Multiple files'
60+
- script: |
61+
cd wpiformat
5862
python3 -m wpiformat -f wpiformat -v
59-
60-
# Ensure formatter made no changes
63+
displayName: 'Directory'
64+
- script: |
6165
git --no-pager diff --exit-code HEAD
62-
displayName: 'Test'
66+
displayName: 'Ensure formatter made no changes'
6367
6468
- job: Windows
6569
pool:
@@ -76,31 +80,35 @@ jobs:
7680
py -3 setup.py install --optimize=1 --skip-build
7781
displayName: 'Build'
7882
- powershell: |
79-
# Make sure .git/refs/heads/master exists
8083
git config --global user.email "[email protected]"
8184
git config --global user.name "Your Name"
8285
git checkout -b pr
8386
git checkout master
8487
git checkout pr
85-
88+
displayName: 'Make sure .git/refs/heads/master exists'
89+
- powershell: |
8690
cd wpiformat
8791
py -3 setup.py test
88-
cd ..
89-
92+
displayName: 'Run unit tests'
93+
- powershell: |
9094
py -3 -m wpiformat -v
95+
displayName: 'Run wpiformat'
96+
- powershell: |
9197
cd wpiformat
92-
# One file
9398
py -3 -m wpiformat -f wpiformat\__init__.py -v
94-
95-
# Absolute path to file
99+
displayName: 'One file'
100+
- powershell: |
101+
cd wpiformat
96102
py -3 -m wpiformat -f D:\a\1\s\wpiformat\wpiformat\__init__.py -v
97-
98-
# Multiple files
103+
displayName: 'Absolute path to file'
104+
- powershell: |
105+
cd wpiformat
99106
py -3 -m wpiformat -f wpiformat\__init__.py wpiformat\__main__.py -v
100-
101-
# Directory
107+
displayName: 'Multiple files'
108+
- powershell: |
109+
cd wpiformat
102110
py -3 -m wpiformat -f wpiformat -v
103-
104-
# Ensure formatter made no changes
111+
displayName: 'Directory'
112+
- powershell: |
105113
git --no-pager diff --exit-code HEAD
106-
displayName: 'Test'
114+
displayName: 'Ensure formatter made no changes'

0 commit comments

Comments
 (0)