mirror of
https://github.com/ivuorinen/monolog-gdpr-filter.git
synced 2026-03-12 12:01:05 +00:00
fix: workflows now use .php-version, other fixes (#98)
* ci: use .php-version file in CI coverage and security jobs * ci: use .php-version file in release workflow * ci: use .php-version file in phpcs workflow * ci: use .php-version file in test-coverage workflow * ci: remove master branch from pr-lint workflow triggers
This commit is contained in:
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
@@ -43,7 +43,7 @@ jobs:
|
||||
restore-keys: ${{ runner.os }}-composer-
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer install --prefer-dist --no-progress --no-suggest
|
||||
run: composer install --prefer-dist --no-progress
|
||||
|
||||
- name: Run PHPUnit tests
|
||||
run: composer test
|
||||
@@ -71,16 +71,16 @@ jobs:
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # 2.36.0
|
||||
with:
|
||||
php-version: "8.4"
|
||||
php-version-file: '.php-version'
|
||||
extensions: mbstring, xml, ctype, iconv, intl, json
|
||||
tools: composer:v2
|
||||
coverage: xdebug
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer install --prefer-dist --no-progress --no-suggest
|
||||
run: composer install --prefer-dist --no-progress
|
||||
|
||||
- name: Run tests with coverage
|
||||
run: composer test:coverage
|
||||
run: composer test:ci
|
||||
|
||||
- name: Upload coverage reports to Codecov
|
||||
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
|
||||
@@ -100,12 +100,12 @@ jobs:
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # 2.36.0
|
||||
with:
|
||||
php-version: "8.4"
|
||||
php-version-file: '.php-version'
|
||||
extensions: mbstring, xml, ctype, iconv, intl, json
|
||||
tools: composer:v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer install --prefer-dist --no-progress --no-suggest
|
||||
run: composer install --prefer-dist --no-progress
|
||||
|
||||
- name: Run security audit
|
||||
run: composer audit
|
||||
|
||||
2
.github/workflows/phpcs.yaml
vendored
2
.github/workflows/phpcs.yaml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
- uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # 2.36.0
|
||||
with:
|
||||
php-version: "8.4"
|
||||
php-version-file: '.php-version'
|
||||
- name: Install dependencies
|
||||
run: composer install --no-interaction --prefer-dist
|
||||
- name: Run PHP_CodeSniffer (PSR-12)
|
||||
|
||||
4
.github/workflows/pr-lint.yml
vendored
4
.github/workflows/pr-lint.yml
vendored
@@ -4,9 +4,9 @@ name: Lint Code Base
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master, main]
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [master, main]
|
||||
branches: [main]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
|
||||
31
.github/workflows/release.yml
vendored
31
.github/workflows/release.yml
vendored
@@ -24,12 +24,12 @@ jobs:
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # 2.36.0
|
||||
with:
|
||||
php-version: "8.4"
|
||||
php-version-file: '.php-version'
|
||||
extensions: mbstring, xml, ctype, iconv, intl, json
|
||||
tools: composer:v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer install --prefer-dist --no-progress --no-suggest --no-dev --optimize-autoloader
|
||||
run: composer install --prefer-dist --no-progress --optimize-autoloader
|
||||
|
||||
- name: Run tests
|
||||
run: composer test
|
||||
@@ -59,29 +59,16 @@ jobs:
|
||||
echo "content=Release ${{ steps.tag.outputs.name }}" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Create Release
|
||||
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4
|
||||
id: create_release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ steps.tag.outputs.name }}
|
||||
release_name: ${{ steps.tag.outputs.name }}
|
||||
body: ${{ steps.changelog.outputs.content }}
|
||||
draft: false
|
||||
prerelease: ${{ contains(steps.tag.outputs.name, '-') }}
|
||||
|
||||
- name: Archive source code
|
||||
run: |
|
||||
mkdir -p release
|
||||
composer archive --format=zip --dir=release --file=monolog-gdpr-filter-${{ steps.tag.outputs.name }}
|
||||
|
||||
- name: Upload release asset
|
||||
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./release/monolog-gdpr-filter-${{ steps.tag.outputs.name }}.zip
|
||||
asset_name: monolog-gdpr-filter-${{ steps.tag.outputs.name }}.zip
|
||||
asset_content_type: application/zip
|
||||
name: ${{ steps.tag.outputs.name }}
|
||||
body: ${{ steps.changelog.outputs.content }}
|
||||
draft: false
|
||||
prerelease: ${{ contains(steps.tag.outputs.name, '-') }}
|
||||
files: ./release/monolog-gdpr-filter-${{ steps.tag.outputs.name }}.zip
|
||||
|
||||
2
.github/workflows/test-coverage.yaml
vendored
2
.github/workflows/test-coverage.yaml
vendored
@@ -25,7 +25,7 @@ jobs:
|
||||
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # 2.36.0
|
||||
with:
|
||||
coverage: pcov
|
||||
php-version: "8.4"
|
||||
php-version-file: '.php-version'
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer install --no-interaction --prefer-dist
|
||||
|
||||
Reference in New Issue
Block a user