diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml new file mode 100644 index 0000000..439495c --- /dev/null +++ b/.github/workflows/integration.yml @@ -0,0 +1,31 @@ +name: Integration test + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + name: Test on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + + steps: + - uses: actions/checkout@v4 + with: + submodules: true + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: lts/* + + - name: Install dependencies + run: npm ci + + - name: Run tests + run: npm test diff --git a/example/index.ts b/example/index.ts index d06280e..532ba04 100644 --- a/example/index.ts +++ b/example/index.ts @@ -10,8 +10,8 @@ const filePath = path.resolve(__dirname, AUDIO_FILE) async function convert() { try { await nodewhisper(filePath, { - modelName: 'base.en', - autoDownloadModelName: 'base.en', + modelName: 'tiny.en', + autoDownloadModelName: 'tiny.en', whisperOptions: { outputInVtt: true, // Default is 20 which is too long @@ -20,6 +20,7 @@ async function convert() { }) } catch (exc) { console.error(exc) + process.exit(1) } }