You've already forked gitea-composer-upload-action
updating structure
This commit is contained in:
73
.github/workflows/tests.yml
vendored
73
.github/workflows/tests.yml
vendored
@@ -41,7 +41,26 @@ jobs:
|
|||||||
php-version: ${{ matrix.php }}
|
php-version: ${{ matrix.php }}
|
||||||
tools: composer:v2
|
tools: composer:v2
|
||||||
coverage: none
|
coverage: none
|
||||||
- run: composer validate --strict --ansi
|
- run: composer validate
|
||||||
|
composer-normalize:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
php:
|
||||||
|
- 8.3
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{env.BRANCH}}
|
||||||
|
- uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php }}
|
||||||
|
tools: composer:v2
|
||||||
|
coverage: none
|
||||||
|
- uses: ramsey/composer-install@v3
|
||||||
|
with:
|
||||||
|
composer-options: --optimize-autoloader
|
||||||
|
- run: composer normalize
|
||||||
composer-require-checker:
|
composer-require-checker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
@@ -80,26 +99,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
composer-options: --optimize-autoloader
|
composer-options: --optimize-autoloader
|
||||||
- run: composer unused
|
- run: composer unused
|
||||||
composer-normalize:
|
linter:
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
php:
|
|
||||||
- 8.3
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: ${{env.BRANCH}}
|
|
||||||
- uses: shivammathur/setup-php@v2
|
|
||||||
with:
|
|
||||||
php-version: ${{ matrix.php }}
|
|
||||||
tools: composer:v2
|
|
||||||
coverage: none
|
|
||||||
- uses: ramsey/composer-install@v3
|
|
||||||
with:
|
|
||||||
composer-options: --optimize-autoloader
|
|
||||||
- run: composer normalize --dry-run --diff --ansi
|
|
||||||
php-cs-fixer:
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -117,8 +117,8 @@ jobs:
|
|||||||
- uses: ramsey/composer-install@v3
|
- uses: ramsey/composer-install@v3
|
||||||
with:
|
with:
|
||||||
composer-options: --optimize-autoloader
|
composer-options: --optimize-autoloader
|
||||||
- run: composer fixcs -- --dry-run --diff --format=checkstyle --ansi | cs2pr
|
- run: composer php-cs-fixer -- --dry-run --diff --format=checkstyle --ansi | cs2pr
|
||||||
rector:
|
refactoring:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -137,7 +137,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
composer-options: --optimize-autoloader
|
composer-options: --optimize-autoloader
|
||||||
- run: composer rector -- --dry-run
|
- run: composer rector -- --dry-run
|
||||||
psalm:
|
static-analysis:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -156,7 +156,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
composer-options: --optimize-autoloader
|
composer-options: --optimize-autoloader
|
||||||
- run: composer psalm -- --php-version=${{ matrix.php }} --stats --output-format=github --shepherd
|
- run: composer psalm -- --php-version=${{ matrix.php }} --stats --output-format=github --shepherd
|
||||||
phpunit:
|
unit-tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -170,9 +170,28 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php }}
|
php-version: ${{ matrix.php }}
|
||||||
tools: composer:v2
|
tools: composer:v2
|
||||||
coverage: xdebug
|
coverage: pcov
|
||||||
- uses: ramsey/composer-install@v3
|
- uses: ramsey/composer-install@v3
|
||||||
with:
|
with:
|
||||||
composer-options: --optimize-autoloader
|
composer-options: --optimize-autoloader
|
||||||
# - run: composer test -- --colors=always --order-by=random --coverage-clover coverage.xml
|
# - run: composer test -- --colors=always --order-by=random --coverage-clover coverage.xml
|
||||||
- run: composer test -- --colors=always --order-by=random
|
- run: composer phpunit
|
||||||
|
mutation-tests:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
php:
|
||||||
|
- 8.3
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{env.BRANCH}}
|
||||||
|
- uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php }}
|
||||||
|
tools: composer:v2
|
||||||
|
coverage: pcov
|
||||||
|
- uses: ramsey/composer-install@v3
|
||||||
|
with:
|
||||||
|
composer-options: --optimize-autoloader
|
||||||
|
- run: composer infection
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ RUN chown -R php:php /usr/bin/app
|
|||||||
COPY . /usr/bin/app
|
COPY . /usr/bin/app
|
||||||
WORKDIR /usr/bin/app
|
WORKDIR /usr/bin/app
|
||||||
|
|
||||||
|
ENV GITHUB_WORKSPACE=/usr/bin/app
|
||||||
|
|
||||||
RUN composer install
|
RUN composer install
|
||||||
|
|
||||||
VOLUME ["/usr/bin/app"]
|
VOLUME ["/usr/bin/app"]
|
||||||
|
|||||||
@@ -32,10 +32,15 @@ docker build . --build-arg=PHP_VERSION=8.3 -t=gitea-package-action
|
|||||||
|
|
||||||
initialization
|
initialization
|
||||||
```shell
|
```shell
|
||||||
docker run --rm -e GITHUB_WORKSPACE=/usr/bin/app -v .:/usr/bin/app gitea-package-action composer install
|
docker run --rm -v .:/usr/bin/app gitea-package-action composer install
|
||||||
```
|
```
|
||||||
|
|
||||||
running
|
running
|
||||||
```shell
|
```shell
|
||||||
docker run --rm -e GITHUB_WORKSPACE=/usr/bin/app -v .:/usr/bin/app gitea-package-action php app.php
|
docker run --rm -v .:/usr/bin/app gitea-package-action php app.php
|
||||||
|
```
|
||||||
|
|
||||||
|
testing
|
||||||
|
```shell
|
||||||
|
docker run --rm -v .:/usr/bin/app gitea-package-action composer tests
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
ARG PHP_VERSION=8.3.10-1
|
ARG PHP_VERSION=8.3
|
||||||
|
|
||||||
FROM rosven9856/php:$PHP_VERSION
|
FROM rosven9856/php:$PHP_VERSION
|
||||||
|
|
||||||
COPY . /usr/bin/app
|
COPY . /usr/bin/app
|
||||||
WORKDIR /usr/bin/app
|
WORKDIR /usr/bin/app
|
||||||
|
|
||||||
RUN composer install
|
RUN composer install --optimize-autoloader
|
||||||
|
|
||||||
VOLUME ["/usr/bin/app"]
|
VOLUME ["/usr/bin/app"]
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
"ergebnis/composer-normalize": "^2.42",
|
"ergebnis/composer-normalize": "^2.42",
|
||||||
"friendsofphp/php-cs-fixer": "^3.57",
|
"friendsofphp/php-cs-fixer": "^3.57",
|
||||||
"icanhazstring/composer-unused": "^0.8.11",
|
"icanhazstring/composer-unused": "^0.8.11",
|
||||||
|
"infection/infection": "^0.27.11",
|
||||||
"maglnet/composer-require-checker": "^4.11",
|
"maglnet/composer-require-checker": "^4.11",
|
||||||
"phpunit/phpunit": "^10.4.2",
|
"phpunit/phpunit": "^10.4.2",
|
||||||
"phpyh/coding-standard": "^2.6",
|
"phpyh/coding-standard": "^2.6",
|
||||||
@@ -38,15 +39,29 @@
|
|||||||
"ergebnis/composer-normalize": true,
|
"ergebnis/composer-normalize": true,
|
||||||
"infection/extension-installer": true
|
"infection/extension-installer": true
|
||||||
},
|
},
|
||||||
"sort-packages": true
|
"sort-packages": true,
|
||||||
|
"sort-scripts": false
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"fixcs": "php-cs-fixer fix --diff --verbose",
|
|
||||||
"infection": "infection --threads=max --show-mutations",
|
"infection": "infection --threads=max --show-mutations",
|
||||||
|
"normalize": "composer normalize --dry-run --diff --ansi",
|
||||||
|
"php-cs-fixer": "php-cs-fixer fix --diff --verbose",
|
||||||
|
"phpunit": "phpunit --colors=always --order-by=random",
|
||||||
"psalm": "psalm --show-info=true --no-diff",
|
"psalm": "psalm --show-info=true --no-diff",
|
||||||
"rector": "rector process",
|
"rector": "rector process",
|
||||||
"require-checker": "composer-require-checker check --config-file=composer-require-checker.json composer.json",
|
"require-checker": "composer-require-checker check --config-file=composer-require-checker.json composer.json",
|
||||||
"test": "phpunit",
|
"tests": [
|
||||||
"unused": "composer-unused"
|
"@validate",
|
||||||
|
"@normalize",
|
||||||
|
"@require-checker",
|
||||||
|
"@unused",
|
||||||
|
"composer php-cs-fixer -- --dry-run --diff --format=checkstyle --ansi",
|
||||||
|
"composer rector -- --dry-run",
|
||||||
|
"composer psalm -- --stats --shepherd",
|
||||||
|
"@phpunit",
|
||||||
|
"@infection"
|
||||||
|
],
|
||||||
|
"unused": "composer-unused --excludePackage=ext-zip",
|
||||||
|
"validate": "composer validate --strict --ansi"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1247
composer.lock
generated
1247
composer.lock
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user