Skip to content

Commit

Permalink
Add GitHub workflow for checking integration with bundlers
Browse files Browse the repository at this point in the history
  • Loading branch information
romaricpascal committed Apr 30, 2024
1 parent f77ae3c commit 74eb9f2
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/bundler-integrations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
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
working-directory: ./.github/workflows/bundler-integrations
run: |
grep -v "Accordion" dist/${{matrix.bundler}}/*.js
8 changes: 8 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -324,3 +324,11 @@ jobs:
# Run existing "Stats comment" workflow
# (after only install has been cached)
uses: ./.github/workflows/stats-comment.yml

bundler-integrations:
name: Bundler integrations
needs: [install, build]

# Run existing "Bundler integrations" workflow
# (after install and build have been cached)
uses: ./.github/workflows/bundler-integrations.yml

0 comments on commit 74eb9f2

Please sign in to comment.