Skip to content

Commit

Permalink
fix: CI unit tests (#5489)
Browse files Browse the repository at this point in the history
* Fixing 'pkg 2' test by manually injecting property into snap. Unable to actually run this test due to CSC_KEY_PASSWORD being required and it's only available via CI on 'master' branch. We know that 'LSRequiresNativeExecution: true' because all other objects in the snap have the property and it's de-facto provided in Electron 11 dist

* Fixing test-linux such that it can be run on mac using local dir and enabling inline cmd vars to be passed to docker container via env `-e`. Env vars have their default value set to as was before. Yarn.lock needed updating from yarn install within docker container

* Switch to test-all

Co-authored-by: Mike Maietta <michaelmaietta@upwork.com>
  • Loading branch information
mmaietta and Mike Maietta authored Dec 21, 2020
1 parent 6b7d305 commit 637334d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"///": "Please see https://github.com/electron-userland/electron-builder/blob/master/CONTRIBUTING.md#run-test-using-cli how to run particular test instead full (and very slow) run",
"test": "node ./test/out/helpers/runTests.js skipArtifactPublisher ALL_TESTS=isCi",
"test-all": "yarn pretest && node ./test/out/helpers/runTests.js",
"test-linux": "docker run --rm -ti -v ${PWD}:/project -v ${PWD##*/}-node-modules:/project/node_modules -v ~/Library/Caches/electron:/root/.cache/electron -v ~/Library/Caches/electron-builder:/root/.cache/electron-builder electronuserland/builder:wine /bin/bash -c \"yarn && TEST_FILES=HoistedNodeModuleTest node ./test/out/helpers/runTests.js\"",
"test-update": "UPDATE_SNAPSHOT=true npm run test",
"test-linux": "docker run --rm -ti -e UPDATE_SNAPSHOT=${UPDATE_SNAPSHOT:-false} -e TEST_FILES=\"${TEST_FILES:-HoistedNodeModuleTest}\" -v $(pwd):/project -v $(pwd)-node-modules:/project/node_modules -v $HOME/Library/Caches/electron:/root/.cache/electron -v $HOME/Library/Caches/electron-builder:/root/.cache/electron-builder electronuserland/builder:wine /bin/bash -c \"yarn && yarn test-all\"",
"test-update": "UPDATE_SNAPSHOT=true yarn test",
"docker-images": "docker/build.sh",
"release": "BABEL_ENV=production yarn compile && ./scripts/publish-packages.sh && conventional-changelog-cli conventional-changelog -p angular -i CHANGELOG.md -s",
"schema": "typescript-json-schema packages/app-builder-lib/tsconfig.json Configuration --out packages/app-builder-lib/scheme.json --noExtraProps --useTypeOfKeyword --strictNullChecks --required && node ./scripts/fix-schema.js",
Expand Down
1 change: 1 addition & 0 deletions test/snapshots/mac/macArchiveTest.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ Object {
"CFBundlePackageType": "APPL",
"CFBundleShortVersionString": "1.1.0",
"LSApplicationCategoryType": "your.app.category.type",
"LSRequiresNativeExecution": true,
"NSAppTransportSecurity": Object {
"NSAllowsLocalNetworking": true,
"NSExceptionDomains": Object {
Expand Down
3 changes: 3 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4311,6 +4311,9 @@ __metadata:
js-yaml: ^3.14.1
sanitize-filename: ^1.6.3
temp-file: ^3.3.7
dependenciesMeta:
dmg-license:
optional: true
languageName: unknown
linkType: soft

Expand Down

0 comments on commit 637334d

Please sign in to comment.