ci.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. - run: bun install
  51. - name: Tests
  52. run: bun test --timeout 60000 --preload ./src/test-preload.ts test/
  53. env:
  54. CI: true
  55. DYLD_LIBRARY_PATH: /opt/homebrew/opt/sqlite/lib
  56. LD_LIBRARY_PATH: /usr/lib/x86_64-linux-gnu