Fix dev setup errors

* Drop non-existent phpunit integration tests
* Do not run php tests for a dev setup
* Replace Makefile one-line commands with the simple npm command

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2021-12-29 12:24:04 +01:00
parent 273e95ddb2
commit 2136ba2772
No known key found for this signature in database
GPG Key ID: CC42AC2A7F0E56D8
2 changed files with 13 additions and 36 deletions

View File

@ -9,14 +9,11 @@ source_package_name=$(source_build_directory)/$(app_name)
appstore_build_directory=$(CURDIR)/build/artifacts appstore_build_directory=$(CURDIR)/build/artifacts
appstore_package_name=$(appstore_build_directory)/$(app_name) appstore_package_name=$(appstore_build_directory)/$(app_name)
all: dev-setup lint build-js-production install-composer-deps-dev test-php all: dev-setup lint build-js-production install-composer-deps-dev
# Dev env management # Dev env management
dev-setup: clean clean-dev install-npm-deps-dev dev-setup: clean clean-dev install-npm-deps-dev
npm-update:
npm update
composer.phar: composer.phar:
curl -sS https://getcomposer.org/installer | php curl -sS https://getcomposer.org/installer | php
@ -31,34 +28,9 @@ install-composer-deps: composer.phar
install-composer-deps-dev: composer.phar install-composer-deps-dev: composer.phar
php composer.phar install -o php composer.phar install -o
# Building
build-js:
npm run dev
build-js-production:
npm run build
watch-js:
npm run watch
# Testing
test:
npm run test
test-watch: test-watch:
npm run test:watch npm run test:watch
test-coverage:
npm run test:coverage
test-php:
php composer.phar run test:unit
php composer.phar run test:integration
test-php-coverage:
php composer.phar run test:unit -- --coverage-clover=coverage-unit.xml
php composer.phar run test:integration -- --coverage-clover=coverage-integration.xml
# Linting # Linting
lint: lint:
npm run lint npm run lint

View File

@ -36,26 +36,31 @@ If you'd like to join, just go through the [issue list](https://github.com/nextc
``` bash ``` bash
# set up and build for production # set up and build for production
make npm ci
npm run build
# install dependencies # install dependencies
make dev-setup npm ci
# build for dev and watch changes # build for dev and watch changes
make watch-js npm run watch
# build for dev # build for dev
make build-js npm run dev
# build for production with minification # build for production with minification
make build-js-production npm run build
``` ```
## Running tests ## Running tests
You can use the provided Makefile to run all tests by using: You can run all front-end tests by using:
``` ```
make test # run tests once
npm run test
# run tests continuously after every change
npm run test:watch
``` ```
## :v: Code of conduct ## :v: Code of conduct