Skip to content

Commit 34c0838

Browse files
authored
ci: streamline with lib (#71)
1 parent cfb0f16 commit 34c0838

File tree

2 files changed

+43
-14
lines changed

2 files changed

+43
-14
lines changed

.github/workflows/pipeline.yml

+11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: pipeline
22
on: pull_request
33

4+
permissions:
5+
contents: read
6+
pull-requests: write
7+
48
jobs:
59
tests:
610
runs-on: ubuntu-latest
@@ -37,6 +41,13 @@ jobs:
3741
- name: Checkout
3842
uses: actions/checkout@v4
3943

44+
- name: Conventional Commit
45+
uses: ytanikin/[email protected]
46+
with:
47+
task_types: '["feat", "fix", "docs", "test", "ci", "style", "refactor", "perf", "chore", "revert"]'
48+
add_label: 'true'
49+
custom_labels: '{"feat": "feature", "fix": "bug", "docs": "documentation", "test": "test", "ci": "CI/CD", "style": "codestyle", "refactor": "refactor", "perf": "performance", "chore": "chore", "revert": "revert"}'
50+
4051
- name: Setup PHP
4152
uses: shivammathur/setup-php@v2
4253
with:

Makefile

+32-14
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,39 @@
1-
qa:
2-
composer update --prefer-stable
3-
PHP_CS_FIXER_IGNORE_ENV=true vendor/bin/php-cs-fixer fix
4-
vendor/bin/phpstan
5-
vendor/bin/phpunit
1+
.PHONY: deps-stable deps-low cs rector phpstan tests coverage run-examples ci ci-stable ci-lowest
62

7-
qa-lowest:
8-
composer update --prefer-lowest
9-
PHP_CS_FIXER_IGNORE_ENV=true vendor/bin/php-cs-fixer fix
10-
vendor/bin/phpstan
11-
vendor/bin/phpunit
3+
deps-stable:
4+
composer update --prefer-stable --ignore-platform-req=ext-mongodb
125

13-
qa-dev:
6+
deps-low:
7+
composer update --prefer-lowest --ignore-platform-req=ext-mongodb
8+
9+
deps-dev:
1410
composer require php-llm/llm-chain:dev-main
15-
PHP_CS_FIXER_IGNORE_ENV=true vendor/bin/php-cs-fixer fix
16-
vendor/bin/phpstan
11+
12+
cs:
13+
PHP_CS_FIXER_IGNORE_ENV=true vendor/bin/php-cs-fixer fix --diff --verbose
14+
15+
rector:
16+
vendor/bin/rector
17+
18+
phpstan:
19+
vendor/bin/phpstan --memory-limit=-1
20+
21+
tests:
1722
vendor/bin/phpunit
18-
# revert
23+
24+
coverage:
25+
XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-html=coverage
26+
27+
run-examples:
28+
./example
29+
30+
ci: ci-stable
31+
32+
ci-stable: deps-stable rector cs phpstan tests
33+
34+
ci-lowest: deps-low rector cs phpstan tests
35+
36+
ci-dev: deps-dev rector cs phpstan tests
1937
git restore composer.json
2038

2139
coverage:

0 commit comments

Comments
 (0)