-
Notifications
You must be signed in to change notification settings - Fork 32
92 lines (89 loc) · 2.85 KB
/
ci.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: CI
on: [push, pull_request]
jobs:
test:
name: Unit tests
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
neovim: [true, false]
version: [stable, nightly]
# Exclude Neovim nightly since Neovim's release workflow is fairly unstable: https://github.com/neovim/neovim/actions/workflows/release.yml
exclude:
- neovim: true
version: nightly
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set Git user for running Git commands in unit tests
run: |
git config --global user.email "users@noreply.github.com"
git config --global user.name "github-action"
- name: Fetch Git history for unit tests
run: git fetch --no-tags --prune --unshallow
- name: Checkout themis.vim
uses: actions/checkout@v4
with:
repository: thinca/vim-themis
path: vim-themis
- uses: rhysd/action-setup-vim@v1
id: vim
with:
version: ${{ matrix.version }}
neovim: ${{ matrix.neovim }}
- name: Run unit tests
env:
THEMIS_VIM: ${{ steps.vim.outputs.executable }}
THEMIS_PROFILE: profile.txt
run: ./vim-themis/bin/themis ./test/all.vimspec
- uses: actions/setup-python@v5
with:
python-version: '3'
- name: Report coverage
run: |
pip install covimerage
covimerage write_coverage profile.txt
coverage report
coverage xml
- name: Upload coverage to codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
test-windows:
name: Unit tests on Windows
strategy:
matrix:
neovim: [true, false]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set Git user for running Git commands in unit tests
run: |
git config --global user.email "users@noreply.github.com"
git config --global user.name "github-action"
- name: Fetch Git history for unit tests
run: git fetch --no-tags --prune --unshallow
- name: Checkout themis.vim
uses: actions/checkout@v4
with:
repository: thinca/vim-themis
path: vim-themis
- uses: rhysd/action-setup-vim@v1
id: vim
with:
version: stable
neovim: ${{ matrix.neovim }}
- name: Run unit tests
env:
THEMIS_VIM: ${{ steps.vim.outputs.executable }}
run: ./vim-themis/bin/themis ./test/all.vimspec
vint:
name: Run vint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3'
- run: pip install setuptools vim-vint
- run: vint --warning --verbose --enable-neovim ./autoload ./plugin