Skip to content
Merged
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
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run tests in Sail’s PHP-Composer container
run: |
docker run --rm \
-u "$(id -u):$(id -g)" \
-v "${{ github.workspace }}":/var/www/html \
-w /var/www/html \
laravelsail/php84-composer:latest \
sh -lc "composer install --no-interaction --prefer-dist && vendor/bin/phpunit"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.idea
vendor
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,16 @@ php artisan vendor:publish --provider="Bst27\ImageProxy\ImageProxyServiceProvide
This will create `config/image-proxy.php`.

---

## Tests

To run tests, you can execute the following command:

```bash
docker run --rm -it \
-u "$(id -u):$(id -g)" \
-v "$PWD":/var/www/html \
-w /var/www/html \
laravelsail/php84-composer:latest \
php vendor/bin/phpunit
```
27 changes: 26 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,30 @@
"laravel/framework": "^11.0|^12.0",
"spatie/image-optimizer": "^1.8",
"ext-openssl": "*"
},
"require-dev": {
"orchestra/testbench": "^10.4"
},
"autoload-dev": {
"psr-4": {
"Workbench\\App\\": "workbench/app/",
"Workbench\\Database\\Factories\\": "workbench/database/factories/",
"Workbench\\Database\\Seeders\\": "workbench/database/seeders/",
"Bst27\\ImageProxy\\Tests\\": "tests/"
}
},
"scripts": {
"post-autoload-dump": [
"@clear",
"@prepare"
],
"clear": "@php vendor/bin/testbench package:purge-skeleton --ansi",
"prepare": "@php vendor/bin/testbench package:discover --ansi",
"build": "@php vendor/bin/testbench workbench:build --ansi",
"serve": [
"Composer\\Config::disableProcessTimeout",
"@build",
"@php vendor/bin/testbench serve --ansi"
]
}
}
}
Loading