Skip to content

Commit

Permalink
Attempt to run electron pipeline in buildkite
Browse files Browse the repository at this point in the history
  • Loading branch information
Cawllec committed Aug 16, 2024
1 parent f771978 commit 6b65dec
Show file tree
Hide file tree
Showing 3 changed files with 116 additions and 3 deletions.
82 changes: 79 additions & 3 deletions .buildkite/basic/electron-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ steps:
env:
NODE_VERSION: "{{matrix.node_version}}"
ELECTRON_VERSION: "{{matrix.electron_version}}"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
START_LOCAL_NPM: "1"
VERBOSE: "1"
matrix:
setup:
electron_version:
Expand All @@ -32,3 +29,82 @@ steps:
- defaults write com.apple.CrashReporter DialogType none
- npm run test:unit:electron-runner
- npm run test:electron

#
# Ubuntu tests Node 18
#
- label: ":docker: Build Electron {{matrix.electron_version}} ubuntu test image"
timeout_in_minutes: 10
env:
ELECTRON_VERSION: "{{matrix.electron_version}}"
matrix:
setup:
electron_version:
- "^20.0.0"
- "^24.0.0"
- "^26.0.0"
- "^28.0.0"
- "^30.0.0"
plugins:
- docker-compose#v4.12.0:
build:
- electron-test-image
image-repository: 855461928731.dkr.ecr.us-west-1.amazonaws.com/js
cache-from:
- electron-test-image:855461928731.dkr.ecr.us-west-1.amazonaws.com/js:ci-electron-test-${BRANCH_NAME}-${matrix.electron_version}
- docker-compose#v4.12.0:
push:
- electron-ubuntu-test:855461928731.dkr.ecr.us-west-1.amazonaws.com/js:ci-electron-test-${BRANCH_NAME}-${matrix.electron_version}

- label: "Electron {{matrix.electron_version}} linting"
timeout_in_minutes: 10
env:
ELECTRON_VERSION: "{{matrix.electron_version}}"
matrix:
setup:
electron_version:
- "^20.0.0"
- "^24.0.0"
- "^26.0.0"
- "^28.0.0"
- "^30.0.0"
plugins:
- docker-compose#v4.12.0:
run: electron-test-image
command: npm run test:lint-native

- label: "Electron {{matrix.electron_version}} unit tests"
timeout_in_minutes: 10
env:
ELECTRON_VERSION: "{{matrix.electron_version}}"
matrix:
setup:
electron_version:
- "^20.0.0"
- "^24.0.0"
- "^26.0.0"
- "^28.0.0"
- "^30.0.0"
plugins:
- docker-compose#v4.12.0:
run: electron-test-image
command: npm run test:unit:electron-runner

- label: "Electron {{matrix.electron_version}} integration tests"
timeout_in_minutes: 10
env:
ELECTRON_VERSION: "{{matrix.electron_version}}"
matrix:
setup:
electron_version:
- "^20.0.0"
- "^24.0.0"
- "^26.0.0"
- "^28.0.0"
- "^30.0.0"
plugins:
- docker-compose#v4.12.0:
run: electron-test-image
command: npm run test:electron
artifact_paths:
- "test/electron/maze_output/**/*"
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,19 @@ services:
context: .
dockerfile: dockerfiles/Dockerfile.ci

electron-test-image:
build:
context: .
dockerfile: dockerfiles/Dockerfile.electron
environment:
<<: *common-environment
ELECTRON_VERSION:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
START_LOCAL_NPM: 1
VERBOSE: 1
volumes:
- ./test/electron/maze_output:/app/test/electron/maze_output

browser-maze-runner-bb:
build:
context: .
Expand Down
24 changes: 24 additions & 0 deletions dockerfiles/Dockerfile.electron
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM node:18-bullseye

RUN apt-get update && apt-get install -y \
build-essential \
xvfb \
libnss3 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libgdk-pixbuf2.0-0 \
libgtk-3-0 \
libasound2 \
libgbm1

COPY . /app
WORKDIR /app

RUN npm install electron@$ELECTRON_VERSION --no-audit --progress=false --no-save
RUN npm ci --no-audit --progress=false

RUN npx lerna bootstrap

RUN npm run build:electron

RUN apt-get install cppcheck -y

0 comments on commit 6b65dec

Please sign in to comment.