ci.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. name: CI
  2. on:
  3. push:
  4. branches: [main, master]
  5. paths-ignore:
  6. - '**/*.md'
  7. - 'docs/**'
  8. - '.all-contributorsrc'
  9. pull_request:
  10. branches: [main, master]
  11. paths-ignore:
  12. - '**/*.md'
  13. - 'docs/**'
  14. - '.all-contributorsrc'
  15. concurrency:
  16. group: ${{ github.workflow }}-${{ github.ref }}
  17. cancel-in-progress: true
  18. jobs:
  19. test:
  20. name: Required / Bun from package.json
  21. runs-on: ubuntu-latest
  22. timeout-minutes: 10
  23. steps:
  24. - name: Checkout code
  25. uses: actions/checkout@v4
  26. - name: Setup Bun
  27. uses: oven-sh/setup-bun@v2
  28. - name: Install dependencies
  29. run: bun ci
  30. - name: Run formatting and lint checks
  31. run: bun run check:ci
  32. - name: Run typecheck
  33. run: bun run typecheck
  34. - name: Run tests
  35. run: |
  36. mkdir -p reports
  37. bun test \
  38. --coverage \
  39. --coverage-reporter=text \
  40. --coverage-reporter=lcov \
  41. --coverage-dir=coverage \
  42. --reporter=junit \
  43. --reporter-outfile=reports/junit.xml
  44. - name: Upload test and coverage reports
  45. if: ${{ always() }}
  46. uses: actions/upload-artifact@v4
  47. with:
  48. name: test-results-bun-pinned
  49. path: |
  50. reports/junit.xml
  51. coverage/lcov.info
  52. if-no-files-found: ignore
  53. retention-days: 14
  54. - name: Build
  55. run: bun run build
  56. bun-latest-canary:
  57. name: Canary / Bun latest
  58. continue-on-error: true
  59. runs-on: ubuntu-latest
  60. timeout-minutes: 10
  61. steps:
  62. - name: Checkout code
  63. uses: actions/checkout@v4
  64. - name: Setup latest Bun
  65. uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
  66. with:
  67. bun-version: latest
  68. - name: Install dependencies
  69. run: bun ci
  70. - name: Run formatting and lint checks
  71. run: bun run check:ci
  72. - name: Run typecheck
  73. run: bun run typecheck
  74. - name: Run tests
  75. run: bun test
  76. - name: Build
  77. run: bun run build