chore: Migrate monorepo to use Bun instead of PNPM #4331
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 run 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 run 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 run 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 PNPM | |
| uses: pnpm/action-setup@f2b2b233b538f500472c7274c7012f57857d8ce0 # v4.1.0 | |
| - 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 }} |