From f7f0aa81fdf77ed1a161ecbdaf81d00282aa06d2 Mon Sep 17 00:00:00 2001 From: Romaric Pascal Date: Tue, 30 Apr 2024 16:03:52 +0100 Subject: [PATCH] Add GitHub workflow for checking integration with bundlers --- .github/workflows/bundler-integrations.yml | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/bundler-integrations.yml diff --git a/.github/workflows/bundler-integrations.yml b/.github/workflows/bundler-integrations.yml new file mode 100644 index 0000000000..1fdebd5caf --- /dev/null +++ b/.github/workflows/bundler-integrations.yml @@ -0,0 +1,40 @@ +name: Bundler integrations + +on: + workflow_call: + workflow_dispatch: + +jobs: + install: + name: Install + runs-on: ubuntu-latest + + env: + PUPPETEER_SKIP_DOWNLOAD: true + + strategy: + fail-fast: false + + matrix: + bundler: + - rollup + - webpack + - vite + + steps: + - name: Checkout + uses: actions/checkout@v4.1.4 + + - name: Restore dependencies + uses: ./.github/workflows/actions/install-node + + - name: Build GOV.UK Frontend + uses: ./.github/workflows/actions/build + + - name: Build with bundler + run: npm run ${{matrix.bundler}} -w @govuk-frontend/bundler-integrations + + # Check output for modules that should not be included + - name: Check output + run: | + ! grep "Accordion" dist/${{matrix.bundler}}/*.js