Enhancements to Dependency Installation and App Testing (#965)
* Add check build extensions * Correct Makefile check extenstions * Add check build extensions * Correct Makefile check extenstions * Include Makefile change will run test * Fix error on linux --------- Co-authored-by: Hien To <tominhhien97@gmail.com> Co-authored-by: Service Account <service@jan.ai>
This commit is contained in:
parent
98068516ab
commit
54f916d3fe
@ -14,6 +14,7 @@ on:
|
|||||||
- "core/**"
|
- "core/**"
|
||||||
- "extensions/**"
|
- "extensions/**"
|
||||||
- "!README.md"
|
- "!README.md"
|
||||||
|
- "Makefile"
|
||||||
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
@ -26,6 +27,7 @@ on:
|
|||||||
- "package.json"
|
- "package.json"
|
||||||
- "node_modules/**"
|
- "node_modules/**"
|
||||||
- "yarn.lock"
|
- "yarn.lock"
|
||||||
|
- "Makefile"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-on-macos:
|
test-on-macos:
|
||||||
|
|||||||
15
Makefile
15
Makefile
@ -21,11 +21,18 @@ endif
|
|||||||
yarn install
|
yarn install
|
||||||
yarn build:extensions
|
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
|
yarn dev
|
||||||
|
|
||||||
# Linting
|
# Linting
|
||||||
lint: install-and-build
|
lint: check-file-counts
|
||||||
yarn lint
|
yarn lint
|
||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
@ -34,11 +41,11 @@ test: lint
|
|||||||
yarn test
|
yarn test
|
||||||
|
|
||||||
# Builds and publishes the app
|
# Builds and publishes the app
|
||||||
build-and-publish: install-and-build
|
build-and-publish: check-file-counts
|
||||||
yarn build:publish
|
yarn build:publish
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
build: install-and-build
|
build: check-file-counts
|
||||||
yarn build
|
yarn build
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user