-
Notifications
You must be signed in to change notification settings - Fork 339
51 lines (39 loc) · 1.4 KB
/
bundler-integrations.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Bundler integrations
on:
workflow_call:
workflow_dispatch:
jobs:
test-tree-shaking:
name: Test tree shaking
runs-on: ubuntu-22.04
env:
PUPPETEER_SKIP_DOWNLOAD: true
strategy:
fail-fast: false
matrix:
bundler:
- rollup
- webpack
- vite
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
- 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 absence of unused modules in `single-component.js`
working-directory: ./.github/workflows/bundler-integrations
run: |
! grep "Accordion" dist/${{matrix.bundler}}/single-component.js -q
- name: Check absence of unused utility functions in `single-component.js`
working-directory: ./.github/workflows/bundler-integrations
run: |
! grep "getFragmentFromUrl" dist/${{matrix.bundler}}/single-component.js -q
- name: Check presence of modules in `initAll.js`
working-directory: ./.github/workflows/bundler-integrations
run: |
grep "Accordion" dist/${{matrix.bundler}}/initAll.js -q