Skip to content

Commit

Permalink
Merge pull request #547 from Bartel-C8/electronTests
Browse files Browse the repository at this point in the history
Resolves #534
  • Loading branch information
aminya authored Dec 7, 2022
2 parents f750205 + e6a6860 commit 1577b8b
Show file tree
Hide file tree
Showing 3 changed files with 117 additions and 6 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,32 @@ jobs:
if: ${{ !matrix.docker }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 8
timeout_minutes: 5
max_attempts: 1
command: |
pnpm run clean
pnpm run test.skip_gc_tests
continue-on-error: "${{ contains(matrix.os, 'ubuntu') && !matrix.docker }}"

- name: Test Electron (Main)
if: "${{ contains(matrix.os, 'ubuntu') && !matrix.docker }}"
uses: nick-fields/retry@v2
with:
timeout_minutes: 5
max_attempts: 1
command: |
sudo apt-get install xvfb
pnpm install -g electron@latest
pnpm run clean
xvfb-run --auto-servernum pnpm run test.electron.main
# continue-on-error: true

- name: Tests + GC Tests (Release)
if: ${{ !matrix.docker }}
run: |
pnpm run clean
pnpm run test
uses: nick-fields/retry@v2
with:
timeout_minutes: 5
max_attempts: 1
command: |
pnpm run clean
pnpm run test
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"chai": "^4.3.7",
"deasync": "^0.1.28",
"downlevel-dts": "^0.11.0",
"electron-mocha": "^11.0.2",
"eslint-config-atomic": "^1.18.1",
"eslint-plugin-prettier": "^4.2.1",
"fs-extra": "^10.1.0",
Expand Down Expand Up @@ -91,8 +92,10 @@
"build.native.debug": "cross-env CMAKE_BUILD_TYPE=Debug node-gyp configure --debug && cross-env CMAKE_BUILD_TYPE=Debug node-gyp build --debug",
"build": "run-s build.js build.native",
"build.debug": "run-s build.js build.native.debug",
"test": "run-s build && mocha",
"test.skip_gc_tests": "run-s build.debug && cross-env SKIP_GC_TESTS=true mocha",
"test": "run-s build && mocha --exit",
"test.skip_gc_tests": "run-s build.debug && cross-env SKIP_GC_TESTS=true mocha --exit",
"test.electron.main": "run-s build && electron-mocha",
"test.electron.renderer": "run-s build && electron-mocha --renderer",
"lint.clang-format": "clang-format -i -style=file ./src/*.cc ./src/*.h ./src/util/*.h",
"lint-test.eslint": "eslint **/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml} --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/",
"lint.eslint": "pnpm run lint-test.eslint --fix",
Expand Down
90 changes: 90 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1577b8b

Please sign in to comment.