Skip to content

Commit dd9e8c0

Browse files
(Feature) Improve CI (#2328)
* Use "npm ci" rather than "npm install" * Move UI tests before production image build * Save zip file artefact from build
1 parent d591d2b commit dd9e8c0

3 files changed

Lines changed: 17 additions & 10 deletions

File tree

.github/workflows/master.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ jobs:
2626

2727
- name: Install
2828
run: |
29-
export DETECT_CHROMEDRIVER_VERSION=true
30-
npm install
29+
npm ci
3130
npm run setheapsize
3231
3332
- name: Lint

.github/workflows/pull_requests.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ jobs:
2222

2323
- name: Install
2424
run: |
25-
export DETECT_CHROMEDRIVER_VERSION=true
26-
npm install
25+
npm ci
2726
npm run setheapsize
2827
2928
- name: Lint
@@ -38,7 +37,22 @@ jobs:
3837
if: success()
3938
run: npx grunt prod
4039

40+
- name: Upload Build Artefact
41+
if: success()
42+
uses: actions/upload-artifact@v7
43+
with:
44+
name: zipped-build
45+
path: build/prod/*.zip
46+
retention-days: 5
47+
48+
- name: UI Tests
49+
if: success()
50+
run: |
51+
sudo apt-get install xvfb
52+
xvfb-run --server-args="-screen 0 1200x800x24" npx grunt testui
53+
4154
- name: Set up Docker Buildx
55+
if: success()
4256
uses: docker/setup-buildx-action@v3
4357

4458
- name: Set up QEMU
@@ -50,8 +64,3 @@ jobs:
5064
uses: docker/build-push-action@v6
5165
with:
5266
platforms: linux/amd64,linux/arm64
53-
- name: UI Tests
54-
if: success()
55-
run: |
56-
sudo apt-get install xvfb
57-
xvfb-run --server-args="-screen 0 1200x800x24" npx grunt testui

.github/workflows/releases.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ jobs:
3232

3333
- name: Install
3434
run: |
35-
export DETECT_CHROMEDRIVER_VERSION=true
3635
npm ci
3736
npm run setheapsize
3837

0 commit comments

Comments
 (0)