Skip to content

Commit

Permalink
Remove workflow (#281)
Browse files Browse the repository at this point in the history
* Remove auto cs-fix

* Remove other workflow

* Apply cs fix
  • Loading branch information
zds-s authored Jun 17, 2024
1 parent 0190b54 commit a7ba21f
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 97 deletions.
34 changes: 0 additions & 34 deletions .github/workflows/crontab-cs-fixer.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/generator-changelog.yml

This file was deleted.

36 changes: 0 additions & 36 deletions .github/workflows/pull-request-cs-fixer.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,31 @@ on:
schedule:
- cron: '0 2 * * *'
jobs:
cs-fix:
name: PHP CS Fix on PHP${{ matrix.php }} ${{ matrix.swoole }}
runs-on: ubuntu-latest
strategy:
matrix:
os: [ ubuntu-latest ]
php: [ '8.1' ]
swoole: [ 'swoole' ]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: php-cs-fixer
extensions: redis, pdo, pdo_mysql, bcmath, ${{ matrix.swoole }}
- name: Setup Packages
run: composer update -oW
- name: Run CS Fix
run: |
vendor/bin/php-cs-fixer fix app --dry-run --diff
vendor/bin/php-cs-fixer fix api --dry-run --diff
tests:
needs: cs-fix
name: Test on PHP${{ matrix.php-version }} Swoole-${{ matrix.sw-version }}
runs-on: "${{ matrix.os }}"
strategy:
Expand Down
2 changes: 1 addition & 1 deletion app/System/Mapper/SystemAppMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function getAppAndInterfaceList(string $appId): array
}
$systemApiGroupMapper = container()->get(SystemApiGroupMapper::class);
$data['apiGroup'] = $systemApiGroupMapper->get(function ($query) use ($groupIds) {
/**
/*
* @var Builder $query
*/
return $query->whereIn('id', array_unique($groupIds));
Expand Down
2 changes: 1 addition & 1 deletion app/System/Mapper/SystemUserMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public function handleSearch(Builder $query, array $params): Builder
$isAll = $params['showDeptAll'] ?? false;

$query->with(['depts' => function ($query) use ($isAll) {
/**
/*
* @var Builder $query
*/
$query->where('status', SystemDept::ENABLE);
Expand Down

0 comments on commit a7ba21f

Please sign in to comment.