ci.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. name: CI
  2. on:
  3. push:
  4. branches: [main]
  5. pull_request:
  6. branches: [main]
  7. jobs:
  8. test-node:
  9. name: Node ${{ matrix.node-version }} (${{ matrix.os }})
  10. runs-on: ${{ matrix.os }}
  11. strategy:
  12. fail-fast: false
  13. matrix:
  14. os: [ubuntu-latest, macos-latest]
  15. node-version: ["22", "23"]
  16. steps:
  17. - uses: actions/checkout@v4
  18. - uses: actions/setup-node@v4
  19. with:
  20. node-version: ${{ matrix.node-version }}
  21. - name: Install SQLite (Ubuntu)
  22. if: runner.os == 'Linux'
  23. run: sudo apt-get update && sudo apt-get install -y libsqlite3-dev
  24. - name: Install SQLite (macOS)
  25. if: runner.os == 'macOS'
  26. run: brew install sqlite
  27. - run: npm install
  28. - name: Tests
  29. run: npx vitest run --reporter=verbose --testTimeout 60000 test/
  30. env:
  31. CI: true
  32. test-bun:
  33. name: Bun (${{ matrix.os }})
  34. runs-on: ${{ matrix.os }}
  35. strategy:
  36. fail-fast: false
  37. matrix:
  38. os: [ubuntu-latest, macos-latest]
  39. steps:
  40. - uses: actions/checkout@v4
  41. - uses: oven-sh/setup-bun@v2
  42. with:
  43. bun-version: latest
  44. - name: Install SQLite (Ubuntu)
  45. if: runner.os == 'Linux'
  46. run: sudo apt-get update && sudo apt-get install -y libsqlite3-dev
  47. - name: Install SQLite (macOS)
  48. if: runner.os == 'macOS'
  49. run: brew install sqlite
  50. - name: Verify lockfile is up-to-date
  51. run: bun install --frozen-lockfile
  52. - name: Tests
  53. run: bun test --timeout 60000 --preload ./src/test-preload.ts test/
  54. env:
  55. CI: true
  56. DYLD_LIBRARY_PATH: /opt/homebrew/opt/sqlite/lib
  57. LD_LIBRARY_PATH: /usr/lib/x86_64-linux-gnu