diff --git a/.changeset/tame-parents-explain.md b/.changeset/tame-parents-explain.md new file mode 100644 index 000000000..4f881ac3b --- /dev/null +++ b/.changeset/tame-parents-explain.md @@ -0,0 +1,5 @@ +--- +'@farmfe/plugin-webpack-partial-bundling': patch +--- + +support webpack partial bundling diff --git a/.github/workflows/rust-plugin-partial-bundling-ci.yaml b/.github/workflows/rust-plugin-partial-bundling-ci.yaml new file mode 100644 index 000000000..52ceeee46 --- /dev/null +++ b/.github/workflows/rust-plugin-partial-bundling-ci.yaml @@ -0,0 +1,50 @@ +name: Plugin Partial Bundling CI +on: + pull_request: + paths: + - 'rust-plugins/**' + +jobs: + call-rust-plugin-webpack-partial-bundling-build: + uses: ./.github/workflows/rust-plugin-build.yaml + with: + root: rust-plugins/partial-bundling + name: plugin-webpack-partial-bundling + + check-plugin-artifacts: + name: Check Plugin Artifacts + runs-on: ubuntu-latest + needs: call-rust-plugin-webpack-partial-bundling-build + steps: + # download rust plugin partial-bundling artifacts + - uses: actions/download-artifact@v3 + id: download-plugin-webpack-partial-bundling-linux-x64-gnu + with: + name: ${{ github.sha }}-linux-x64-gnu-plugin-webpack-partial-bundling + path: ./rust-plugins/partial-bundling/npm/linux-x64-gnu + - name: List Files + run: ls -l ./rust-plugins/partial-bundling/npm/linux-x64-gnu/index.farm + + - uses: actions/download-artifact@v3 + id: download-darwin-x64 + with: + name: ${{ github.sha }}-darwin-x64-plugin-webpack-partial-bundling + path: ./rust-plugins/partial-bundling/npm/darwin-x64 + - name: List Files + run: ls -l ./rust-plugins/partial-bundling/npm/darwin-x64/index.farm + + - uses: actions/download-artifact@v3 + id: download-win32-x64-msvc + with: + name: ${{ github.sha }}-win32-x64-msvc-plugin-webpack-partial-bundling + path: ./rust-plugins/partial-bundling/npm/win32-x64-msvc + - name: List Files + run: ls -l ./rust-plugins/partial-bundling/npm/win32-x64-msvc/index.farm + + - uses: actions/download-artifact@v3 + id: download-darwin-arm64 + with: + name: ${{ github.sha }}-darwin-arm64-plugin-webpack-partial-bundling + path: ./rust-plugins/partial-bundling/npm/darwin-arm64 + - name: List Files + run: ls -l ./rust-plugins/partial-bundling/npm/darwin-arm64/index.farm diff --git a/.github/workflows/test-examples.yaml b/.github/workflows/test-examples.yaml index 1d174e06a..0d8b9f118 100644 --- a/.github/workflows/test-examples.yaml +++ b/.github/workflows/test-examples.yaml @@ -20,6 +20,12 @@ jobs: root: rust-plugins/sass name: plugin-sass + call-rust-plugin-webpack-partial-bundling-build: + uses: ./.github/workflows/rust-plugin-build.yaml + with: + root: rust-plugins/partial-bundling + name: plugin-webpack-partial-bundling + examples-test: name: Examples Test runs-on: ${{ matrix.settings.os }} @@ -60,5 +66,11 @@ jobs: name: ${{ github.sha }}-${{ matrix.settings.abi }}-plugin-react path: ./rust-plugins/react/npm/${{ matrix.settings.abi }} + - uses: actions/download-artifact@v3 + id: download-plugin-webpack-partial-bundling + with: + name: ${{ github.sha }}-${{ matrix.settings.abi }}-plugin-webpack-partial-bundling + path: ./rust-plugins/partial-bundling/npm/${{ matrix.settings.abi }} + - name: Test Examples - ${{ matrix.settings.abi }} run: node scripts/test-examples.mjs