重构 Model Meta 的注解管理 #2232
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rector | |
on: | |
push: | |
paths-ignore: | |
- "doc/**" | |
- "mddoc/**" | |
- "res/**" | |
- "website/**" | |
- ".markdownlint.json" | |
- "README.md" | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
env: | |
REPOSITORY_OWNER: ${{ github.repository_owner }} | |
IMAGE_VERSION: php8.1-swoole-5.0 | |
ENV_SERVICE: swoole-only | |
RUNNING_CI_RECTOR_CACHE_DIR: /tmp/base_cache/rector | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Prepare1 | |
run: | | |
echo "REPOSITORY_OWNER=${REPOSITORY_OWNER,,}" >>${GITHUB_ENV} | |
mkdir -p /tmp/base_cache/composer | |
mkdir -p /tmp/base_cache/rector | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: /tmp/base_cache/composer | |
key: ${{ runner.os }}-composer-${{ env.IMAGE_VERSION }}-${{ hashFiles('*/composer.json', 'src/Components/*/composer.json') }} | |
restore-keys: | | |
${{ runner.os }}-composer-${{ env.IMAGE_VERSION }}- | |
${{ runner.os }}-composer- | |
- name: Prepare2 | |
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 config --global cache-files-dir /tmp/base_cache/composer | |
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: Cache Rector | |
uses: actions/cache@v4 | |
with: | |
path: /tmp/base_cache/rector | |
key: ${{ runner.os }}-rector-${{ env.IMAGE_VERSION }}-${{ github.run_id }} | |
restore-keys: | | |
${{ runner.os }}-rector-${{ env.IMAGE_VERSION }}- | |
- name: Analyse core | |
if: ${{ env.test_prepared && always() }} | |
run: | | |
docker exec ${ENV_SERVICE} ./vendor/bin/rector process --dry-run | |
- name: Analyse amqp | |
if: ${{ env.test_prepared && always() }} | |
run: | | |
docker exec -w /imi/src/Components/amqp ${ENV_SERVICE} /imi/vendor/bin/rector process --dry-run | |
- name: Analyse apidoc | |
if: ${{ env.test_prepared && always() }} | |
run: | | |
docker exec -w /imi/src/Components/apidoc ${ENV_SERVICE} /imi/vendor/bin/rector process --dry-run | |
- name: Analyse fpm | |
if: ${{ env.test_prepared && always() }} | |
run: | | |
docker exec -w /imi/src/Components/fpm ${ENV_SERVICE} /imi/vendor/bin/rector process --dry-run | |
- name: Analyse grpc | |
if: ${{ env.test_prepared && always() }} | |
run: | | |
docker exec -w /imi/src/Components/grpc ${ENV_SERVICE} /imi/vendor/bin/rector process --dry-run | |
- name: Analyse jwt | |
if: ${{ env.test_prepared && always() }} | |
run: | | |
docker exec -w /imi/src/Components/jwt ${ENV_SERVICE} /imi/vendor/bin/rector process --dry-run | |
- name: Analyse kafka | |
if: ${{ env.test_prepared && always() }} | |
run: | | |
docker exec -w /imi/src/Components/kafka ${ENV_SERVICE} /imi/vendor/bin/rector process --dry-run | |
- name: Analyse mqtt | |
if: ${{ env.test_prepared && always() }} | |
run: | | |
docker exec -w /imi/src/Components/mqtt ${ENV_SERVICE} /imi/vendor/bin/rector process --dry-run | |
- name: Analyse pgsql | |
if: ${{ env.test_prepared && always() }} | |
run: | | |
docker exec -w /imi/src/Components/pgsql ${ENV_SERVICE} /imi/vendor/bin/rector process --dry-run | |
- name: Analyse queue | |
if: ${{ env.test_prepared && always() }} | |
run: | | |
docker exec -w /imi/src/Components/queue ${ENV_SERVICE} /imi/vendor/bin/rector process --dry-run | |
- name: Analyse rate-limit | |
if: ${{ env.test_prepared && always() }} | |
run: | | |
docker exec -w /imi/src/Components/rate-limit ${ENV_SERVICE} /imi/vendor/bin/rector process --dry-run | |
- name: Analyse roadrunner | |
if: ${{ env.test_prepared && always() }} | |
run: | | |
docker exec -w /imi/src/Components/roadrunner ${ENV_SERVICE} /imi/vendor/bin/rector process --dry-run | |
- name: Analyse rpc | |
if: ${{ env.test_prepared && always() }} | |
run: | | |
docker exec -w /imi/src/Components/rpc ${ENV_SERVICE} /imi/vendor/bin/rector process --dry-run | |
- name: Analyse shared-memory | |
if: ${{ env.test_prepared && always() }} | |
run: | | |
docker exec -w /imi/src/Components/shared-memory ${ENV_SERVICE} /imi/vendor/bin/rector process --dry-run | |
- name: Analyse smarty | |
if: ${{ env.test_prepared && always() }} | |
run: | | |
docker exec -w /imi/src/Components/smarty ${ENV_SERVICE} /imi/vendor/bin/rector process --dry-run | |
- name: Analyse snowflake | |
if: ${{ env.test_prepared && always() }} | |
run: | | |
docker exec -w /imi/src/Components/snowflake ${ENV_SERVICE} /imi/vendor/bin/rector process --dry-run | |
- name: Analyse swoole | |
if: ${{ env.test_prepared && always() }} | |
run: | | |
docker exec -w /imi/src/Components/swoole ${ENV_SERVICE} /imi/vendor/bin/rector process --dry-run | |
- name: Analyse swoole-tracker | |
if: ${{ env.test_prepared && always() }} | |
run: | | |
docker exec -w /imi/src/Components/swoole-tracker ${ENV_SERVICE} /imi/vendor/bin/rector process --dry-run | |
- name: Analyse workerman | |
if: ${{ env.test_prepared && always() }} | |
run: | | |
docker exec -w /imi/src/Components/workerman ${ENV_SERVICE} /imi/vendor/bin/rector process --dry-run | |
- name: Analyse workerman-gateway | |
if: ${{ env.test_prepared && always() }} | |
run: | | |
docker exec -w /imi/src/Components/workerman-gateway ${ENV_SERVICE} /imi/vendor/bin/rector process --dry-run | |
- name: Analyse connection-center | |
if: ${{ env.test_prepared && always() }} | |
run: | | |
docker exec -w /imi/src/Components/connection-center ${ENV_SERVICE} /imi/vendor/bin/rector process --dry-run | |
- name: Analyse database | |
if: ${{ env.test_prepared && always() }} | |
run: | | |
docker exec -w /imi/src/Components/database ${ENV_SERVICE} /imi/vendor/bin/rector process --dry-run | |
- name: Analyse model | |
if: ${{ env.test_prepared && always() }} | |
run: | | |
docker exec -w /imi/src/Components/model ${ENV_SERVICE} /imi/vendor/bin/rector process --dry-run |