diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 91d28eb..d114946 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,6 @@ jobs: with: node-version: ${{ matrix.node-version }} - - name: Install dependencies run: npm ci - name: Run tests @@ -30,3 +29,4 @@ jobs: env: BUNNY_ACCESS_KEY: ${{ secrets.BUNNY_ACCESS_KEY }} BUNNY_STORAGE_ZONE: ${{ secrets.BUNNY_STORAGE_ZONE }} + TEST_FILE_NAME: test-file-node-${{ matrix.node-version }}.txt \ No newline at end of file diff --git a/test.ts b/test.ts index 9e8646c..c4df3e2 100644 --- a/test.ts +++ b/test.ts @@ -2,7 +2,7 @@ import { BunnyStorage } from './src/index.js'; import { writeFileSync, unlinkSync } from 'node:fs'; import { join } from 'node:path'; -const TEST_FILE_NAME = 'test-file.txt'; +const TEST_FILE_NAME = process.env.TEST_FILE_NAME || 'test-file.txt'; const TEST_CONTENT = 'Hello, Bunny Storage!'; const REMOTE_PATH = 'test-folder'; // Folder will be created automatically on upload @@ -22,6 +22,8 @@ async function runTests() { } console.log('🧪 Starting Bunny Storage tests...'); + console.log(`Using test file: ${TEST_FILE_NAME}`); + console.log(`Using remote path: ${REMOTE_PATH}`); try { // Create a local test file