Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancements to Dependency Installation and App Testing #965

Merged
merged 10 commits into from
Dec 18, 2023
2 changes: 2 additions & 0 deletions .github/workflows/jan-electron-linter-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
- "core/**"
- "extensions/**"
- "!README.md"
- "Makefile"

pull_request:
branches:
Expand All @@ -26,6 +27,7 @@ on:
- "package.json"
- "node_modules/**"
- "yarn.lock"
- "Makefile"

jobs:
test-on-macos:
Expand Down
15 changes: 11 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,18 @@ endif
yarn install
yarn build:extensions

dev: install-and-build
check-file-counts: install-and-build
ifeq ($(OS),Windows_NT)
powershell -Command "$$tgz_count = (Get-ChildItem -Path electron/pre-install -Filter *.tgz | Measure-Object | Select-Object -ExpandProperty Count); $$dir_count = (Get-ChildItem -Path extensions -Directory | Measure-Object | Select-Object -ExpandProperty Count); if ($$tgz_count -ne $$dir_count) { Write-Host 'Number of .tgz files in electron/pre-install (' + $$tgz_count + ') does not match the number of subdirectories in extension (' + $$dir_count + ')'; exit 1 } else { Write-Host 'Extension build successful' }"
else
@tgz_count=$$(find electron/pre-install -type f -name "*.tgz" | wc -l); dir_count=$$(find extensions -mindepth 1 -maxdepth 1 -type d | wc -l); if [ $$tgz_count -ne $$dir_count ]; then echo "Number of .tgz files in electron/pre-install ($$tgz_count) does not match the number of subdirectories in extension ($$dir_count)"; exit 1; else echo "Extension build successful"; fi
endif

dev: check-file-counts
yarn dev

# Linting
lint: install-and-build
lint: check-file-counts
yarn lint

# Testing
Expand All @@ -34,11 +41,11 @@ test: lint
yarn test

# Builds and publishes the app
build-and-publish: install-and-build
build-and-publish: check-file-counts
yarn build:publish

# Build
build: install-and-build
build: check-file-counts
yarn build

clean:
Expand Down
Loading