diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8e984a..2f7bac4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,8 +11,8 @@ on: workflow_dispatch: jobs: - unittests: - name: Run unittests + unit-test: + name: Run unit tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -23,10 +23,10 @@ jobs: with: version: ^9.7.0 run_install: true - - run: pnpm unittest + - run: pnpm test:unit-test upload-test: name: Run upload test - needs: unittests + needs: unit-test if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} runs-on: ubuntu-latest steps: @@ -46,7 +46,7 @@ jobs: publish: name: Publish action needs: - - unittests + - unit-test - upload-test if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} runs-on: ubuntu-latest diff --git a/package.json b/package.json index 3611b75..9f8964c 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,8 @@ "scripts": { "build": "pnpm clean && pnpm transpile && cp action.yml dist", "transpile": "esbuild src/index.ts --platform=node --target=node20 --minify --bundle --outfile=dist/index.cjs", - "test": "pnpm unttest && pnpm test:upload", - "unittest": "vitest --silent", + "test": "pnpm test:unit-test && pnpm test:upload", + "test:unit-test": "vitest --silent", "test:upload": "pnpm clean && pnpm transpile:test:upload && node -r dotenv/config dist/test/upload.cjs dotenv_config_path=test/.env.local", "transpile:test:upload": "esbuild test/upload.ts --platform=node --target=node20 --minify --bundle --outfile=dist/test/upload.cjs", "lint": "eslint src --fix", diff --git a/test/.env.example b/test/.env.example index 40be394..89f57c9 100644 --- a/test/.env.example +++ b/test/.env.example @@ -1,4 +1,4 @@ -# Copy this file to .env.local and `pnpm test` to run unittest. +# Copy this file to .env.local and `pnpm test:unit=test` to run unit tests. TEST_ADDON_GUID=your-addon-guid TEST_JWT_ISSUER=your-jwt-issuer TEST_JWT_SECRET=your-jwt-secret