-
Notifications
You must be signed in to change notification settings - Fork 2.8k
92 lines (89 loc) · 2.63 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:
workflow_dispatch:
pull_request:
push:
branches:
- master
jobs:
python-tests:
strategy:
fail-fast: false
matrix:
runs-on: [ ubuntu-20.04, macos-12, windows-2019 ]
python-arch: [ 'x64' ]
python-version: [ '3.8' ]
include:
- runs-on: windows-2019
python-arch: 'x86'
python-version: '3.9'
- runs-on: windows-2019
python-arch: 'x64'
python-version: '3.9'
exclude:
- runs-on: windows-2019
python-arch: 'x64'
python-version: '3.8'
env:
COVERAGE: true
name: "${{ matrix.runs-on }} - Python ${{ matrix.python-version }} ${{ matrix.python-arch }}"
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Install Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.python-arch }}
- name: Run pip
run: python3 -m pip install -r python/test_requirements.txt
- name: Run tests
run: python3 run_tests.py --quiet python/ycm/tests
- name: summarise coverage
run: coverage xml
- name: Upload coverage data
uses: codecov/codecov-action@v3
with:
name: "${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.python-arch }}"
vim-tests:
strategy:
fail-fast: false
matrix:
vim: [ 'new', 'old' ]
arch: [ 'x86_64' ]
runs-on: ubuntu-20.04
container: 'youcompleteme/ycm-vim-${{ matrix.arch }}-py3:test'
env:
COVERAGE: true
YCM_TEST_STDOUT: true
name: "Vim tests - ${{ matrix.vim }}"
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Install dependencies
run: sudo -H pip3 install -r python/test_requirements.txt
- name: Install Java
uses: actions/setup-java@v2
with:
java-version: 17
distribution: 'temurin'
- name: Build ycmd
run: python3 ./install.py --force-sudo --ts-completer --clangd-completer --java-completer
- name: Run tests in old vim
# System vim should be oldest supported.
if: matrix.vim == 'old'
run: ./test/run_vim_tests --vim /usr/bin/vim
- name: Run tests in new vim
if: matrix.vim == 'new'
run: ./test/run_vim_tests
- name: Combine and summarise coverage
run: coverage combine && coverage xml
- name: Upload coverage data
uses: codecov/codecov-action@v3
with:
name: "vim-tests-${{ matrix.vim }}"