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

[3.0] 清理开发依赖 #609

Merged
merged 4 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 27 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: /tmp/composer
key: ${{ runner.os }}-composer-${{ matrix.swoole.version }}-${{ hashFiles('/composer.json') }}
Expand Down Expand Up @@ -125,9 +125,9 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: /tmp/composer
key: ${{ runner.os }}-composer-${{ matrix.swoole.version }}-${{ hashFiles('/composer.json') }}
Expand Down Expand Up @@ -196,7 +196,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup Services
shell: bash
run: |
Expand All @@ -216,17 +216,23 @@ jobs:
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ matrix.swoole-cli }}-${{ hashFiles('/composer.json') }}
- name: Prepare
run: |
echo "::group::Composer install"
composer update --prefer-dist --no-progress
echo "::endgroup::"
echo "::group::Kafka prepare"
.github/prepare-kafka.sh
echo "::endgroup::"
echo "::group::Table Init"
docker exec mysql mysql -uroot -p -e "ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root';flush privileges;"
tests/db/install-db.sh
docker exec postgres psql -d db_imi_test -U root -f /imi/.github/pgsql.sql
echo "::endgroup::"
echo "test_prepared=1" >> $GITHUB_ENV

- name: Test
Expand Down Expand Up @@ -293,7 +299,7 @@ jobs:
ROADRUNNER_DOCKER_VERSION: ${{ matrix.roadrunner }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup MySQL
uses: shogo82148/actions-setup-mysql@v1
with:
Expand Down Expand Up @@ -334,15 +340,21 @@ jobs:
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ env.php-versions }}-${{ hashFiles('/composer.json') }}
- name: Prepare
run: |
echo "::group::Env prepare"
mysql -uroot -proot -e 'CREATE DATABASE IF NOT EXISTS db_imi_test;'
echo "::endgroup::"
echo "::group::Composer install"
composer update --prefer-dist --no-progress
echo "::endgroup::"
echo "::group::Table Init"
tests/db/install-db.sh
echo "::endgroup::"

- name: Install RoadRunner
run: |
Expand Down Expand Up @@ -414,7 +426,7 @@ jobs:
ROADRUNNER_DOCKER_VERSION: ${{ matrix.roadrunner }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup MySQL
uses: shogo82148/actions-setup-mysql@v1
Expand All @@ -441,9 +453,15 @@ jobs:

- name: Prepare
run: |
Write-Output "::group::Env prepare"
mysql -uroot -proot -e 'CREATE DATABASE IF NOT EXISTS db_imi_test;'
Write-Output "::endgroup::"
Write-Output "::group::Composer install"
composer update --prefer-dist --no-progress
Write-Output "::endgroup::"
Write-Output "::group::Table Init"
php src\Cli\bin\imi-cli generate/table --app-namespace "Imi\Test\Component"
Write-Output "::endgroup::"

- name: Install RoadRunner
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install libs
run: sudo apt update && sudo apt install -y libevent-dev libcurl4-openssl-dev libc-ares-dev libpq-dev postgresql-client
- name: Setup PHP
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
needs: test
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/daily-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
COMPOSER_ENV: --ignore-platform-reqs
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: /tmp/composer
key: ${{ runner.os }}-composer-${{ matrix.swoole.version }}-${{ hashFiles('/composer.json') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/markdownlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Prepare
run: |
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,21 @@ jobs:
ENV_SERVICE: swoole-only
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Prepare
run: |
echo "::group::Env prepare"
docker-compose -f ./.github/docker-compose.yml up -d ${ENV_SERVICE}
echo "::endgroup::"
echo "::group::Env info"
docker exec ${ENV_SERVICE} php -v
docker exec ${ENV_SERVICE} composer -V
echo "::endgroup::"
echo "::group::Composer install"
docker exec ${ENV_SERVICE} composer update --no-interaction --prefer-dist --no-progress
docker exec ${ENV_SERVICE} bash -c "cd split-repository && composer install --no-interaction --prefer-dist --no-progress"
echo "::endgroup::"

- name: Coding Standards Tests
run: docker exec ${ENV_SERVICE} ./vendor/bin/php-cs-fixer fix --dry-run --diff -vvv
8 changes: 7 additions & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,23 @@ jobs:
ENV_SERVICE: swoole-only
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Prepare
run: |
echo "::group::Env prepare"
docker-compose -f ./.github/docker-compose.yml up -d ${ENV_SERVICE}
echo "::endgroup::"
echo "::group::Env info"
docker exec ${ENV_SERVICE} php -v
docker exec ${ENV_SERVICE} php -m
docker exec ${ENV_SERVICE} php --ri swoole
docker exec ${ENV_SERVICE} composer -V
echo "::endgroup::"
echo "::group::Composer install"
docker exec ${ENV_SERVICE} composer update --no-interaction --prefer-dist --no-progress
docker exec ${ENV_SERVICE} bash -c "cd split-repository && composer install --no-interaction --prefer-dist --no-progress"
echo "::endgroup::"
echo "test_prepared=1" >> $GITHUB_ENV

- name: Analyse core
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,23 @@ jobs:
ENV_SERVICE: swoole-only
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Prepare
run: |
echo "::group::Env prepare"
docker-compose -f ./.github/docker-compose.yml up -d ${ENV_SERVICE}
echo "::endgroup::"
echo "::group::Env info"
docker exec ${ENV_SERVICE} php -v
docker exec ${ENV_SERVICE} php -m
docker exec ${ENV_SERVICE} php --ri swoole
docker exec ${ENV_SERVICE} composer -V
echo "::endgroup::"
echo "::group::Composer install"
docker exec ${ENV_SERVICE} composer update --no-interaction --prefer-dist --no-progress
docker exec ${ENV_SERVICE} bash -c "cd split-repository && composer install --no-interaction --prefer-dist --no-progress"
echo "::endgroup::"
echo "test_prepared=1" >> $GITHUB_ENV

- name: Analyse core
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/split-repository.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
GITHUB_REPOSITORY: ${{ github.repository }}
steps:
- uses: ahmadnassri/action-workflow-queue@v1
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
7 changes: 0 additions & 7 deletions src/Components/amqp/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
"php-amqplib/php-amqplib": "^3.5"
},
"require-dev": {
"yurunsoft/ide-helper": "~1.0",
"swoole/ide-helper": "~5.0"
},
"autoload": {
"psr-4": {
Expand All @@ -36,11 +34,6 @@
"post-update-cmd": "Imi\\AMQP\\Dev\\Dev::postUpdate"
},
"extra": {
"ide-helper": {
"list": [
"redis"
]
}
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand Down
7 changes: 0 additions & 7 deletions src/Components/apidoc/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
"doctrine/annotations": "^1.7"
},
"require-dev": {
"yurunsoft/ide-helper": "~1.0",
"swoole/ide-helper": "~5.0"
},
"autoload": {
"psr-4": {
Expand All @@ -28,11 +26,6 @@
},
"scripts": {},
"extra": {
"ide-helper": {
"list": [
"redis"
]
}
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand Down
7 changes: 0 additions & 7 deletions src/Components/kafka/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
"longlang/phpkafka": "^1.1"
},
"require-dev": {
"yurunsoft/ide-helper": "~1.0",
"swoole/ide-helper": "~5.0"
},
"autoload": {
"psr-4": {
Expand All @@ -36,11 +34,6 @@
"post-update-cmd": "Imi\\Kafka\\Dev\\Dev::postUpdate"
},
"extra": {
"ide-helper": {
"list": [
"redis"
]
}
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand Down
7 changes: 0 additions & 7 deletions src/Components/mqtt/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
"binsoul/net-mqtt": "^0.8.0"
},
"require-dev": {
"yurunsoft/ide-helper": "~1.0",
"swoole/ide-helper": "~5.0"
},
"autoload": {
"psr-4": {
Expand All @@ -34,11 +32,6 @@
"post-update-cmd": "Imi\\MQTT\\Dev\\Dev::postUpdate"
},
"extra": {
"ide-helper": {
"list": [
"redis"
]
}
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand Down
1 change: 0 additions & 1 deletion src/Components/pgsql/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"description": "imi 框架配套的 pgsql 组件",
"require": {},
"require-dev": {
"swoole/ide-helper": "~5.0"
},
"autoload": {
"psr-4": {
Expand Down
7 changes: 0 additions & 7 deletions src/Components/queue/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
"description": "imi 框架的队列组件,使用 Redis 作为持久化",
"require": {},
"require-dev": {
"yurunsoft/ide-helper": "~1.0",
"swoole/ide-helper": "~5.0"
},
"autoload": {
"psr-4": {
Expand All @@ -32,11 +30,6 @@
"post-update-cmd": "Imi\\Queue\\Dev\\Dev::postUpdate"
},
"extra": {
"ide-helper": {
"list": [
"redis"
]
}
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand Down
Loading