ci: use make targets in the ci

Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
This commit is contained in:
Saw-jan 2025-01-22 17:16:42 +05:45
Родитель b6947d6ac5
Коммит 718bc0bef9
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 8CB52C9ABF046F4A
2 изменённых файлов: 16 добавлений и 15 удалений

11
.github/workflows/shared_workflow.yml поставляемый
Просмотреть файл

@ -92,7 +92,7 @@ jobs:
cd server && git submodule update --init
./occ maintenance:install --admin-pass=admin
- name: PHP code analysis
- name: PHP code analysis and linting
run: |
# The following if block can be removed once Nextcloud no longer supports PHP 8.0
if [ "${{matrix.phpVersion}}" -eq 8 ]; then
@ -100,18 +100,13 @@ jobs:
sed -i '/<ignoreFiles>/a \ <file name="tests/lib/Service/OpenProjectAPIServiceTest.php"/>' psalm.xml
fi
make psalm
- name: PHP code style
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )
make phpcs || ( echo 'Please run `make phpcs-fix` to format your code' && exit 1 )
- name: Install NPM Dependencies
run: npm install
- name: JS Lint
run: npm run lint
- name: Style Lint
run: npm run stylelint
run: make lint-js || ( echo 'Please run `make lint-js-fix` to format your code' && exit 1 )
- name: PHP & Vue Unit Tests
run: |

Просмотреть файл

@ -65,19 +65,19 @@ npm-dev:
psalm:
composer run psalm
.PHONY: csfixer
csfixer:
.PHONY: phpcs
phpcs:
composer run cs:check
.PHONY: csfixer-fix
csfixer-fix:
.PHONY: phpcs-fix
phpcs-fix:
composer run cs:fix
.PHONY: lint-php
lint-php: psalm csfixer
lint-php: psalm phpcs
.PHONY: lint-php
lint-php-fix: psalm csfixer-fix
.PHONY: lint-php-fix
lint-php-fix: psalm phpcs-fix
.PHONY: lint-js
lint-js:
@ -89,6 +89,12 @@ lint-js-fix:
npm run lint:fix
npm run stylelint:fix
.PHONY: lint
lint: lint-php lint-js
.PHONY: lint-fix
lint-fix: lint-php-fix lint-js-fix
.PHONY: phpunit
phpunit:
composer run test:unit