test.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. name: CI
  2. on:
  3. push:
  4. paths-ignore:
  5. - '**.md'
  6. - 'ChangeLog'
  7. pull_request:
  8. paths-ignore:
  9. - '**.md'
  10. - 'ChangeLog'
  11. jobs:
  12. test:
  13. runs-on: ubuntu-latest
  14. strategy:
  15. fail-fast: false
  16. matrix:
  17. # See https://github.com/purcell/nix-emacs-ci/blob/master/flake.nix
  18. emacs_version:
  19. - 29.2
  20. - 28.2
  21. - 27.2
  22. - 26.3
  23. - 25.3
  24. - 24.5
  25. - 24.4
  26. - snapshot
  27. env:
  28. coveralls_skip_versions: "" # Empty list
  29. steps:
  30. - name: Set up Emacs
  31. uses: purcell/setup-emacs@master
  32. with:
  33. version: ${{matrix.emacs_version}}
  34. - name: Install Eldev
  35. uses: nick-invision/retry@v2
  36. with:
  37. max_attempts: 3
  38. timeout_minutes: 1
  39. command: curl -fsSL https://raw.github.com/doublep/eldev/master/webinstall/github-eldev | sh
  40. - name: Check out the source code
  41. uses: actions/checkout@v4
  42. - name: Install Elisp dependencies
  43. uses: nick-invision/retry@v2
  44. with:
  45. max_attempts: 3
  46. timeout_minutes: 2
  47. command: eldev prepare test
  48. - name: Compile the package
  49. run: eldev compile
  50. - name: Run the test suite
  51. run: |
  52. eldev -p -dtT test
  53. - name: Run the test suite with flx-ido
  54. run: |
  55. eldev -p -S '(load-file "./Eldev-flx-ido")' -dtT test
  56. - name: Run the test suite in source mode (for undercover)
  57. if: ${{ ! contains(env.coveralls_skip_versions, matrix.emacs_version) }}
  58. env:
  59. COVERALLS_FLAG_NAME: Emacs ${{ matrix.emacs_version }}
  60. COVERALLS_PARALLEL: 1
  61. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  62. run: |
  63. eldev -s -dtT test
  64. eldev -s -S '(load-file "./Eldev-flx-ido")' -dtT test
  65. finalize:
  66. runs-on: ubuntu-latest
  67. if: always()
  68. needs: test
  69. steps:
  70. - name: Finalize Coveralls
  71. run: |
  72. curl "https://coveralls.io/webhook?repo_name=$GITHUB_REPOSITORY&repo_token=${{ secrets.GITHUB_TOKEN }}" -d "payload[build_num]=$GITHUB_RUN_NUMBER&payload[status]=done"