ci.yml 2.5 KB

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