chore: Migrate monorepo to use Bun instead of PNPM #4323
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 🛡️ Validate | |
| on: | |
| workflow_call: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| checks: | |
| name: Checks | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0 | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Basic Checks | |
| run: bun check | |
| builds: | |
| name: Builds | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0 | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Build All Packages | |
| run: bun buildc all | |
| build-demo: | |
| name: Build Demo | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0 | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Build | |
| run: bun run build:all | |
| working-directory: packages/wxt-demo | |
| - name: ZIP | |
| run: bun wxt zip | |
| working-directory: packages/wxt-demo | |
| tests: | |
| name: Tests (${{ matrix.title }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - title: 'Linux' | |
| os: ubuntu-22.04 | |
| coverage: true | |
| - title: 'Windows' | |
| os: windows-latest | |
| coverage: false | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0 | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@22457c87c1b161cf7dde222c3e82b2b5f8d2bed2 # v2.0.2 | |
| - name: Run Tests | |
| if: ${{ ! matrix.coverage }} | |
| run: bun run test | |
| - name: Run Tests (Coverage) | |
| if: matrix.coverage | |
| run: bun run test:coverage --reporter=default --reporter=hanging-process | |
| - name: Upload Coverage | |
| if: matrix.coverage | |
| uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| template: | |
| name: Template | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| template: | |
| - react | |
| - solid | |
| - svelte | |
| - vanilla | |
| - vue | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0 | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Pack WXT package | |
| run: bun pm pack | |
| working-directory: packages/wxt | |
| - name: Install Dependencies | |
| run: npm i | |
| working-directory: templates/${{ matrix.template }} | |
| - name: Install Packed WXT | |
| run: npm i -D ../../packages/wxt/wxt-*.tgz | |
| working-directory: templates/${{ matrix.template }} | |
| - name: Type Check Template | |
| run: bun run compile | |
| if: matrix.template != 'svelte' | |
| working-directory: templates/${{ matrix.template }} | |
| - name: Type Check Template | |
| run: bun run check | |
| if: matrix.template == 'svelte' | |
| working-directory: templates/${{ matrix.template }} | |
| - name: Build Template | |
| run: bun run build | |
| working-directory: templates/${{ matrix.template }} |