ci.yml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. name: CI
  2. on:
  3. workflow_dispatch:
  4. pull_request:
  5. push:
  6. branches:
  7. - master
  8. jobs:
  9. python-tests:
  10. strategy:
  11. fail-fast: false
  12. matrix:
  13. runs-on: [ ubuntu-20.04, macos-12, windows-2019 ]
  14. python-arch: [ 'x64' ]
  15. python-version: [ '3.8' ]
  16. include:
  17. - runs-on: windows-2019
  18. python-arch: 'x86'
  19. python-version: '3.9'
  20. - runs-on: windows-2019
  21. python-arch: 'x64'
  22. python-version: '3.9'
  23. exclude:
  24. - runs-on: windows-2019
  25. python-arch: 'x64'
  26. python-version: '3.8'
  27. env:
  28. COVERAGE: true
  29. name: "${{ matrix.runs-on }} - Python ${{ matrix.python-version }} ${{ matrix.python-arch }}"
  30. runs-on: ${{ matrix.runs-on }}
  31. steps:
  32. - uses: actions/checkout@v3
  33. with:
  34. submodules: recursive
  35. fetch-depth: 0
  36. - name: Install Python
  37. uses: actions/setup-python@v3
  38. with:
  39. python-version: ${{ matrix.python-version }}
  40. architecture: ${{ matrix.python-arch }}
  41. - name: Run pip
  42. run: python3 -m pip install -r python/test_requirements.txt
  43. - name: Run tests
  44. run: python3 run_tests.py --quiet python/ycm/tests
  45. - name: summarise coverage
  46. run: coverage xml
  47. - name: Upload coverage data
  48. uses: codecov/codecov-action@v3
  49. with:
  50. name: "${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.python-arch }}"
  51. token: ${{ secrets.CODECOV_TOKEN }}
  52. vim-tests:
  53. strategy:
  54. fail-fast: false
  55. matrix:
  56. vim: [ 'new', 'old' ]
  57. arch: [ 'x86_64' ]
  58. runs-on: ubuntu-20.04
  59. container: 'youcompleteme/ycm-vim-${{ matrix.arch }}-py3:test'
  60. env:
  61. COVERAGE: true
  62. YCM_TEST_STDOUT: true
  63. name: "Vim tests - ${{ matrix.vim }}"
  64. steps:
  65. - uses: actions/checkout@v3
  66. with:
  67. submodules: recursive
  68. fetch-depth: 0
  69. - name: Install dependencies
  70. run: sudo -H pip3 install -r python/test_requirements.txt
  71. - name: Install Java
  72. uses: actions/setup-java@v3
  73. with:
  74. java-version: 17
  75. distribution: 'temurin'
  76. - name: Build ycmd
  77. run: python3 ./install.py --force-sudo --ts-completer --clangd-completer --java-completer
  78. - name: Run tests in old vim
  79. # System vim should be oldest supported.
  80. if: matrix.vim == 'old'
  81. run: ./test/run_vim_tests --vim /usr/bin/vim
  82. - name: Run tests in new vim
  83. if: matrix.vim == 'new'
  84. run: ./test/run_vim_tests
  85. - name: Combine and summarise coverage
  86. run: coverage combine && coverage xml
  87. - name: Upload coverage data
  88. uses: codecov/codecov-action@v3
  89. with:
  90. name: "vim-tests-${{ matrix.vim }}"
  91. token: ${{ secrets.CODECOV_TOKEN }}