test.yml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. run: curl -fsSL https://raw.github.com/doublep/eldev/master/webinstall/github-eldev | sh
  36. - name: Check out the source code
  37. uses: actions/checkout@v4
  38. - name: Install Elisp dependencies
  39. run: eldev prepare test
  40. - name: Compile the package
  41. run: eldev compile
  42. - name: Run the test suite
  43. run: |
  44. eldev -p -dtT test
  45. - name: Run the test suite with flx-ido
  46. run: |
  47. eldev -p -S '(load-file "./Eldev-flx-ido")' -dtT test
  48. - name: Run the test suite in source mode (for undercover)
  49. if: ${{ ! contains(env.coveralls_skip_versions, matrix.emacs_version) }}
  50. env:
  51. COVERALLS_FLAG_NAME: Emacs ${{ matrix.emacs_version }}
  52. COVERALLS_PARALLEL: 1
  53. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  54. run: |
  55. eldev -s -dtT test
  56. eldev -s -S '(load-file "./Eldev-flx-ido")' -dtT test
  57. finalize:
  58. runs-on: ubuntu-latest
  59. if: always()
  60. needs: test
  61. steps:
  62. - name: Finalize Coveralls
  63. run: |
  64. curl "https://coveralls.io/webhook?repo_name=$GITHUB_REPOSITORY&repo_token=${{ secrets.GITHUB_TOKEN }}" -d "payload[build_num]=$GITHUB_RUN_NUMBER&payload[status]=done"