diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3e53c76..b3b64b7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,9 +16,6 @@ jobs: continue-on-error: true strategy: matrix: - include: - - os: windows-latest - bun-version: canary os: - ubuntu-latest - macos-latest @@ -40,12 +37,37 @@ jobs: - name: Setup Bun uses: ./ + id: setup_bun with: bun-version: ${{ matrix.bun-version }} - name: Run Bun + id: run_bun run: | bun --version + echo "version=$(bun --version)" >> $GITHUB_OUTPUT + echo "revision=$(bun --revision)" >> $GITHUB_OUTPUT + + - name: Check version + shell: bash + run: | + if [[ "${{ steps.run_bun.outputs.version }}" == "${{ steps.setup_bun.outputs.version }}" ]]; then + echo "Version is ${{ steps.setup_bun.outputs.version }}" + else + echo "Expected version to be ${{ steps.setup_bun.outputs.version }}, got ${{ steps.run_bun.outputs.version }}" + exit 1 + fi + + - name: Check revision + shell: bash + run: | + if [[ "${{ steps.run_bun.outputs.revision }}" == "${{ steps.setup_bun.outputs.revision }}" ]]; then + echo "Revision is ${{ steps.setup_bun.outputs.revision }}" + else + echo "Expected revision to be ${{ steps.setup_bun.outputs.revision }}, got ${{ steps.run_bun.outputs.revision }}" + exit 1 + fi + setup-bun-from-package-json-version: runs-on: ${{ matrix.os }} strategy: diff --git a/src/index.ts b/src/index.ts index 1c996e0..08f0a62 100644 --- a/src/index.ts +++ b/src/index.ts @@ -68,13 +68,12 @@ runAction({ noCache: getBooleanInput("no-cache") || false, }) .then(({ version, revision, cacheHit }) => { - console.log("Setting output"); setOutput("bun-version", version); setOutput("bun-revision", revision); setOutput("cache-hit", cacheHit); - console.log("Done"); process.exit(0); }) .catch((error) => { setFailed(error); + process.exit(1); }); diff --git a/src/utils.ts b/src/utils.ts index 5288706..645b6d0 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,8 +1,5 @@ export function retry(fn: () => Promise, retries: number): Promise { return fn().catch((err) => { - console.log(`Remaining retries ${retries}`); - console.log("Current error:"); - console.log(err); if (retries <= 0) { throw err; }