You've already forked gitea-composer-upload-action
updating structure
This commit is contained in:
178
.github/workflows/tests.yml
vendored
Normal file
178
.github/workflows/tests.yml
vendored
Normal file
@@ -0,0 +1,178 @@
|
||||
name: tests
|
||||
|
||||
on:
|
||||
pull_request: ~
|
||||
push:
|
||||
branches: ['*.*.*']
|
||||
|
||||
env:
|
||||
BRANCH: ${{ github.head_ref || github.ref_name }}
|
||||
|
||||
jobs:
|
||||
docker-build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{env.BRANCH}}
|
||||
- run: cp .env.dist .env
|
||||
- uses: falti/dotenv-action@v1
|
||||
id: dotenv
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
- uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
build-args: |
|
||||
PHP_VERSION=${{ steps.dotenv.outputs.PHP_VERSION }}
|
||||
push: false
|
||||
composer-validate:
|
||||
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
|
||||
- run: composer validate --strict --ansi
|
||||
composer-require-checker:
|
||||
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 require-checker
|
||||
composer-unused:
|
||||
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 unused
|
||||
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 --dry-run --diff --ansi
|
||||
php-cs-fixer:
|
||||
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, cs2pr
|
||||
coverage: none
|
||||
- uses: ramsey/composer-install@v3
|
||||
with:
|
||||
composer-options: --optimize-autoloader
|
||||
- run: composer fixcs -- --dry-run --diff --format=checkstyle --ansi | cs2pr
|
||||
rector:
|
||||
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 rector -- --dry-run
|
||||
psalm:
|
||||
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 psalm -- --php-version=${{ matrix.php }} --stats --output-format=github --shepherd
|
||||
phpunit:
|
||||
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: xdebug
|
||||
- uses: ramsey/composer-install@v3
|
||||
with:
|
||||
composer-options: --optimize-autoloader
|
||||
# - run: composer test -- --colors=always --order-by=random --coverage-clover coverage.xml
|
||||
- run: composer test -- --colors=always --order-by=random
|
||||
Reference in New Issue
Block a user