antongolub / action-setup-bun

Setup GitHub Actions workflow with a specific version of Bun
MIT License
49 stars 0 forks source link

Install error with custom image container #62

Closed Ninerian closed 1 year ago

Ninerian commented 1 year ago

Issue type

Expected behavior

Actual behavior

Steps to reproduce

Create a GitHub workflow with the yaml:

name: Playwright Tests
on:
  push:
    branches: [main, master]
  pull_request:
    branches: [main, master]

jobs:
  playwright:
    name: 'Playwright Tests - ${{ matrix.project }} - Shard ${{ matrix.shardIndex }} of ${{ matrix.shardTotal }}'
    runs-on: ubuntu-latest
    container:
      image: mcr.microsoft.com/playwright:v1.35.0-jammy
    strategy:
      fail-fast: false
      matrix:
        project: [chromium]
        shardIndex: [1]
        shardTotal: [1]
    steps:
      - uses: actions/checkout@v3
      # needed, as unzip is not available in the image
      - name: add unzip
        run: |
          apt-get update
          apt-get upgrade -y
          apt-get install zip -y

      - name: Setup Bun Runtime
        uses: antongolub/action-setup-bun@v1
      - uses: actions/setup-node@v3
        with:
          node-version: 18
      - name: Install dependencies
        run: bun install
      - name: Run your tests
        run: npx playwright test --project=${{ matrix.project }} --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}

and let it run on the CI.

Within the Setup Bun Runtime the following log is listed:

Run antongolub/action-setup-bun@v1
/usr/bin/docker exec  10b949fbf0c32987977f32c8bf62a751f777dc4131ad1c974bb71172d03bcf10 sh -c "cat /etc/*release | grep ^ID"
Downloading bun from https://github.com/Jarred-Sumner/bun-releases-for-updater/releases/download/bun-v0.6.13/bun-linux-x64.zip
bun dist tool-cached: /__t/bun/0.6.13/x64
/usr/bin/unzip -o -q /__w/_temp/e8d8da8d-3621-4e47-a8d4-da969607e639
Error: EXDEV: cross-device link not permitted, rename '/__w/_temp/db3f3987-d9a7-46aa-8ec9-b02990a2f44b/bun-linux-x64/bun' -> '/github/home/.bun/bin/bun'

Specifications

antongolub commented 1 year ago

@Ninerian,

Thanks for the report. Looks like a fs.rename corner case, so I'll try to apply the suggested patch. Hope this helps.