(Feature) Improve CI (#2328)

* Use "npm ci"  rather than "npm install"
* Move UI tests before production image build
* Save zip file artefact from build
This commit is contained in:
GCHQDeveloper581 2026-04-20 10:49:48 +01:00 committed by GitHub
parent d591d2be1b
commit dd9e8c018d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 17 additions and 10 deletions

View File

@ -26,8 +26,7 @@ jobs:
- name: Install
run: |
export DETECT_CHROMEDRIVER_VERSION=true
npm install
npm ci
npm run setheapsize
- name: Lint

View File

@ -22,8 +22,7 @@ jobs:
- name: Install
run: |
export DETECT_CHROMEDRIVER_VERSION=true
npm install
npm ci
npm run setheapsize
- name: Lint
@ -38,7 +37,22 @@ jobs:
if: success()
run: npx grunt prod
- name: Upload Build Artefact
if: success()
uses: actions/upload-artifact@v7
with:
name: zipped-build
path: build/prod/*.zip
retention-days: 5
- name: UI Tests
if: success()
run: |
sudo apt-get install xvfb
xvfb-run --server-args="-screen 0 1200x800x24" npx grunt testui
- name: Set up Docker Buildx
if: success()
uses: docker/setup-buildx-action@v3
- name: Set up QEMU
@ -50,8 +64,3 @@ jobs:
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
- name: UI Tests
if: success()
run: |
sudo apt-get install xvfb
xvfb-run --server-args="-screen 0 1200x800x24" npx grunt testui

View File

@ -32,7 +32,6 @@ jobs:
- name: Install
run: |
export DETECT_CHROMEDRIVER_VERSION=true
npm ci
npm run setheapsize