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
60 changes: 55 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,18 @@ on:
pull_request:
branches: [master]

permissions:
contents: write # Allows the workflow to push changes
actions: read # Allows reading action logs
pull-requests: write # Enables PR creation and updates

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
laravel: [9.*, 10.*] # Laravel versions to test
php: [8.1, 8.2, 8.3] # PHP versions to test

steps:
- name: Checkout code
Expand All @@ -17,12 +26,53 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
coverage: none

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Create Laravel ${{ matrix.laravel }}
run: |
composer create-project --prefer-dist laravel/laravel laravel-test-project "${{ matrix.laravel }}" --no-interaction
mkdir -p laravel-test-project/packages/eren/laravel-commands

- name: updating laravel
working-directory: laravel-test-project
run: |
composer update laravel/framework

- name: Laravel version
working-directory: laravel-test-project
run: composer show laravel/framework

- name: Copy Local Package
run: rsync -av --exclude='laravel-test-project' ./ laravel-test-project/packages/eren/laravel-commands/

- name: checked copied files
run: |
ls -l laravel-test-project/packages/eren/laravel-commands/
ls -l laravel-test-project/packages/eren/laravel-commands/src
ls -l laravel-test-project/packages/eren/laravel-commands/src/Commands
ls -l laravel-test-project/packages/eren/laravel-commands/src/Providers

- name: Link Local Package
working-directory: laravel-test-project
run: |
composer config repositories.local '{"type": "path", "url": "packages/eren/laravel-commands", "options": {"symlink": true}}'
composer require eren/laravel-commands --no-interaction --no-progress

- name: Prepare Laravel Environment
working-directory: laravel-test-project
run: |
cp .env.example .env
php artisan key:generate
php artisan config:clear

- name: Modify phpunit.xml to Include Package Tests
run: |
# sed -i '/<\/testsuite>/i\ <directory suffix="Test.php">packages/eren/laravel-commands/src/Tests</directory>' phpunit.xml
rsync -av --exclude='laravel-test-project' ./src/Tests/ laravel-test-project/tests/Feature

# - name: Run tests
# run: ./vendor/bin/phpunit
- name: Run Tests
working-directory: laravel-test-project
run: |
php artisan test
21 changes: 21 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Security Policy

## Supported Versions

Use this section to tell people about which versions of your project are
currently being supported with security updates.

| Version | Supported |
| ------- | ------------------ |
| 5.1.x | :white_check_mark: |
| 5.0.x | :x: |
| 4.0.x | :white_check_mark: |
| < 4.0 | :x: |

## Reporting a Vulnerability

Use this section to tell people how to report a vulnerability.

Tell them where to go, how often they can expect to get an update on a
reported vulnerability, what to expect if the vulnerability is accepted or
declined, etc.
3 changes: 0 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
"email": "nouman.laravel@outlook.com"
}
],
"require": {
"laravel/framework": "9.52.17"
},
"extra": {
"laravel": {
"providers": [
Expand Down
Loading