Skip to content

Commit 5320b1c

Browse files
authored
Merge pull request #368 from pre-commit/azure_pipelines
azure pipelines [skip travis] [skip appveyor]
2 parents 8171e47 + 8bb94f0 commit 5320b1c

File tree

10 files changed

+33
-95
lines changed

10 files changed

+33
-95
lines changed

.coveragerc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ omit =
66
.tox/*
77
/usr/*
88
setup.py
9-
get-git-lfs.py
109

1110
[report]
1211
show_missing = True

.travis.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
[![Build Status](https://travis-ci.org/pre-commit/pre-commit-hooks.svg?branch=master)](https://travis-ci.org/pre-commit/pre-commit-hooks)
2-
[![Coverage Status](https://coveralls.io/repos/github/pre-commit/pre-commit-hooks/badge.svg?branch=master)](https://coveralls.io/github/pre-commit/pre-commit-hooks?branch=master)
3-
[![Build status](https://ci.appveyor.com/api/projects/status/dfcpng35u4g0r0t1/branch/master?svg=true)](https://ci.appveyor.com/project/asottile/pre-commit-hooks/branch/master)
1+
[![Build Status](https://asottile.visualstudio.com/asottile/_apis/build/status/pre-commit.pre-commit-hooks?branchName=master)](https://asottile.visualstudio.com/asottile/_build/latest?definitionId=17&branchName=master)
2+
[![Azure DevOps coverage](https://img.shields.io/azure-devops/coverage/asottile/asottile/17/master.svg)](https://dev.azure.com/asottile/asottile/_build/latest?definitionId=17&branchName=master)
43

54
pre-commit-hooks
6-
==========
5+
================
76

87
Some out-of-the-box hooks for pre-commit.
98

appveyor.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

azure-pipelines.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
trigger:
2+
branches:
3+
include: [master, test-me-*]
4+
5+
resources:
6+
repositories:
7+
- repository: asottile
8+
type: github
9+
endpoint: asottile-github
10+
name: asottile/azure-pipeline-templates
11+
ref: refs/tags/v0.0.8
12+
13+
jobs:
14+
- template: job--python-tox.yml@asottile
15+
parameters:
16+
toxenvs: [py27, py37]
17+
os: windows
18+
pre_test:
19+
- script: git lfs
20+
- template: job--python-tox.yml@asottile
21+
parameters:
22+
toxenvs: [pypy, py27, py36, py37]
23+
os: linux
24+
pre_test:
25+
- script: git lfs

get-git-lfs.py

Lines changed: 0 additions & 42 deletions
This file was deleted.

pre_commit_hooks/util.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ def cmd_output(*cmd, **kwargs): # type: (*str, **Any) -> str
2424
proc = subprocess.Popen(cmd, **kwargs)
2525
stdout, stderr = proc.communicate()
2626
stdout = stdout.decode('UTF-8')
27-
if stderr is not None:
28-
stderr = stderr.decode('UTF-8')
2927
if retcode is not None and proc.returncode != retcode:
3028
raise CalledProcessError(cmd, retcode, proc.returncode, stdout, stderr)
3129
return stdout

tests/check_added_large_files_test.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import absolute_import
22
from __future__ import unicode_literals
33

4-
import subprocess
4+
import distutils.spawn
55

66
import pytest
77

@@ -67,8 +67,7 @@ def test_integration(temp_git_dir):
6767

6868

6969
def has_gitlfs():
70-
output = cmd_output('git', 'lfs', retcode=None, stderr=subprocess.STDOUT)
71-
return 'git lfs status' in output
70+
return distutils.spawn.find_executable('git-lfs') is not None
7271

7372

7473
xfailif_no_gitlfs = pytest.mark.xfail(

tests/check_merge_conflict_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def f1_is_a_conflict_file(tmpdir):
2222
cmd_output('git', 'init', '--', repo1.strpath)
2323
with repo1.as_cwd():
2424
repo1_f1.ensure()
25-
cmd_output('git', 'add', '--', repo1_f1.strpath)
25+
cmd_output('git', 'add', '.')
2626
cmd_output('git', 'commit', '--no-gpg-sign', '-m', 'commit1')
2727

2828
cmd_output('git', 'clone', repo1.strpath, repo2.strpath)
@@ -77,7 +77,7 @@ def repository_pending_merge(tmpdir):
7777
cmd_output('git', 'init', repo1.strpath)
7878
with repo1.as_cwd():
7979
repo1_f1.ensure()
80-
cmd_output('git', 'add', '--', repo1_f1.strpath)
80+
cmd_output('git', 'add', '.')
8181
cmd_output('git', 'commit', '--no-gpg-sign', '-m', 'commit1')
8282

8383
cmd_output('git', 'clone', repo1.strpath, repo2.strpath)
@@ -90,7 +90,7 @@ def repository_pending_merge(tmpdir):
9090
# Commit in clone and pull without committing
9191
with repo2.as_cwd():
9292
repo2_f2.write('child\n')
93-
cmd_output('git', 'add', '--', repo2_f2.strpath)
93+
cmd_output('git', 'add', '.')
9494
cmd_output('git', 'commit', '--no-gpg-sign', '-m', 'clone commit2')
9595
cmd_output('git', 'pull', '--no-commit', '--no-rebase')
9696
# We should end up in a pending merge

tox.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[tox]
2-
# These should match the travis env list
32
envlist = py27,py36,py37,pypy3
43

54
[testenv]

0 commit comments

Comments
 (0)