Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.github/ export-ignore
fixtures/ export-ignore
tests/ export-ignore
docs/ export-ignore
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "composer" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
76 changes: 65 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- master
schedule:
- cron: "0 6 * * *"
pull_request:
branches:
- master
Expand All @@ -18,19 +20,71 @@ jobs:
matrix:
os:
- ubuntu-latest
php:
- "latest"
- "8.1"
- "7.4"
php-version:
- "8.2"
- "8.3"
- "8.4"

runs-on: ${{ matrix.os }}
name: Test PHP ${{ matrix.php }}, ${{ matrix.os }},
name: Test PHP ${{ matrix.php-version }}, ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: php-actions/composer@v6

- name: PHPUnit tests
uses: php-actions/phpunit@v4
with:
php_version: ${{ matrix.php }}
- name: Checkout
uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
coverage: "pcov"

- name: Get Composer Cache Directory 2
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
id: actions-cache
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-${{ matrix.php-version }}-

- name: Cache PHP dependencies
uses: actions/cache@v4
id: vendor-cache
with:
path: vendor
key: ${{ runner.os }}-build-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}

- name: Install Composer dependencies
run: composer install --no-progress

- name: Code style test
run: ./vendor/bin/phpcs

- name: PHPStan code analysis
run: php vendor/bin/phpstan analyze

- name: PHPinsights code analysis
run: php vendor/bin/phpinsights analyse --no-interaction

- name: Execute Rector
run: vendor/bin/rector --dry-run

- name: Run tests
run: ./vendor/bin/phpunit --coverage-clover=coverage.xml --log-junit=junit.xml

- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Send code coverage report to Codecov.io
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/vendor/
/composer.lock
/coverage.xml
/.phpunit.result.cache
/.phpcs-cache
41 changes: 32 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,34 @@
{
"name": "bluemoehre/wave-php",
"description": "PHP class for native reading WAV (RIFF-WAVE) metadata and generating SVG-Waveforms. (PCM only)",
"license": "GPL-2.0-only",
"autoload": {
"classmap": ["src/Wave.php"]
},
"require-dev": {
"phpunit/phpunit": "9.*"
}
"name": "bluemoehre/wave-php",
"description": "PHP class for native reading WAV (RIFF-WAVE) metadata and generating SVG-Waveforms. (PCM only)",
"keywords" : [
"wav",
"riff",
"pcm"
],
"license": "GPL-2.0-only",
"autoload": {
"classmap": ["src/Wave.php"]
},
"autoload" : {
"psr-4" : {
"bluemoehre\\" : "src/"
}
},
"require" : {
"php": ">=8.2"
},
"require-dev" : {
"squizlabs/php_codesniffer" : ">=3.7",
"phpunit/phpunit" : "^11 ",
"phpstan/phpstan": "^2",
"phpstan/phpstan-phpunit": "^2",
"rector/rector": "^2",
"nunomaduro/phpinsights": "^2"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
Loading