Skip to content

Commit 79b9284

Browse files
authored
Merge branch 'master' into heredoc
2 parents 5a262b0 + 02c2d5b commit 79b9284

37 files changed

+2347
-1066
lines changed

.coveragerc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
[run]
22
plugins = covimerage
33
data_file = .coverage_covimerage
4+
include = py/*.py
5+
branch = 1

.flake8

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[flake8]
2+
per-file-ignores =
3+
# undefined names for StringReader, VimLParser, Compiler
4+
py/vimlfunc.py:F821
5+
py/vimlparser.py:E501

.travis.yml

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,63 @@ dist: xenial
33
git:
44
depth: 10
55

6-
matrix:
6+
jobs:
77
include:
8-
- env:
8+
- name: Vim 7.4
9+
env:
910
- VIM_VERSION=v7.4
10-
- MAKE_TARGET=test
11+
- MAKE_TARGET=vim/test
1112
- TEST_PROFILE=vim-profile-v7.4.txt
12-
- env:
13+
- name: Vim v8
14+
env:
1315
- VIM_VERSION=v8.0.0000
14-
- MAKE_TARGET=test
16+
- MAKE_TARGET=vim/test
1517
- TEST_PROFILE=vim-profile-v8.0.txt
16-
- env:
18+
- name: Vim master
19+
env:
1720
- VIM_VERSION=master
18-
- MAKE_TARGET=test
21+
- MAKE_TARGET=vim/test
1922
- TEST_PROFILE=vim-profile-master.txt
20-
- env:
23+
- TEST_PYTHON=python3
24+
- name: Installed Vim with checks
25+
env:
2126
- VIM_VERSION=installed
22-
- MAKE_TARGET="clean_compiled check js/test py/test test/node_position/test_position.out"
27+
- MAKE_TARGET=test
2328
- TEST_PROFILE=vim-profile-installed.txt
29+
- TEST_PYTHON="python -m coverage run --append"
2430

2531
install:
2632
- |
27-
if [ "$VIM_VERSION" != 'installed' ]; then
33+
if [ "$VIM_VERSION" = 'installed' ]; then
34+
python -m pip install -q --user flake8 git+https://github.com/Kuniwak/vint
35+
else
2836
bash scripts/install-vim.sh
2937
export PATH=$HOME/vim/bin:$PATH
3038
fi
31-
- pip install covimerage --user
39+
- python -m pip install -q --user covimerage
40+
- python -m pip freeze
3241

3342
script:
3443
- uname -a
3544
- which -a vim
36-
- vim --cmd version --cmd quit
45+
- vim --version
3746
- make --keep-going $MAKE_TARGET
3847

3948
after_success:
49+
- curl -s https://codecov.io/bash > /tmp/codecov.sh
50+
# Coverage from Python (cannot be combined with non-branch data).
51+
- |
52+
if [[ -f .coverage_covimerage ]]; then
53+
coverage report -m
54+
coverage xml
55+
bash /tmp/codecov.sh -f coverage.xml -F python
56+
fi
57+
# Coverage from Vim.
4058
- covimerage write_coverage $TEST_PROFILE
59+
- coverage report -m
4160
- coverage xml
42-
- bash <(curl -s https://codecov.io/bash) -f coverage.xml
61+
- bash /tmp/codecov.sh -f coverage.xml -F vimscript
62+
63+
branches:
64+
only:
65+
- master

Makefile

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ COMPILED_FILES:=js/vimlparser.js py/vimlparser.py
22

33
all: $(COMPILED_FILES)
44

5+
test: clean_compiled check fast-test
6+
fast-test: checkpy checkvim vim/test js/test py/test test/node_position/test_position.out
7+
58
js/vimlparser.js: autoload/vimlparser.vim js/jscompiler.vim js/vimlfunc.js
69
scripts/jscompile.sh $< $@
710

@@ -16,17 +19,25 @@ check: all
1619
echo 'Compiled files were updated, but should have been included/committed.'; \
1720
exit 1; }
1821

19-
test:
22+
checkpy: all
23+
flake8 py
24+
25+
# Run vint, using py/vimlparser.py.
26+
checkvim: all
27+
PYTHONPATH=py vint autoload py/pycompiler.vim
28+
29+
vim/test:
2030
test/run.sh
2131

2232
js/test: js/vimlparser.js
2333
test/run_command.sh node js/vimlparser.js
2434

35+
py/test: TEST_PYTHON?=python
2536
py/test: py/vimlparser.py
26-
test/run_command.sh python py/vimlparser.py
37+
test/run_command.sh $(TEST_PYTHON) py/vimlparser.py
2738

2839
test/node_position/test_position.out: test/node_position/test_position.vim test/node_position/test_position.ok
2940
vim -Nu test/vimrc -S test/node_position/test_position.vim
3041
diff -u test/node_position/test_position.ok test/node_position/test_position.out
3142

32-
.PHONY: all clean_compiled check test js/test py/test
43+
.PHONY: all clean_compiled check test fast-test vim/test js/test py/test

0 commit comments

Comments
 (0)