Skip to content

Commit

Permalink
test: check that there are no package conflicts with laravel
Browse files Browse the repository at this point in the history
  • Loading branch information
kangasta committed Sep 4, 2023
1 parent 87dfc0e commit 26cebb8
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ on:
branches:
- main
pull_request:
branches:
- main
jobs:
Build:
Test:
strategy:
matrix:
os-php-versions: [
Expand Down Expand Up @@ -35,3 +33,21 @@ jobs:
xdebug.max_nesting_level: 512
UPCLOUD_API_TEST_USER: ${{ secrets.UPCLOUD_API_TEST_USER }}
UPCLOUD_API_TEST_PASSWORD: ${{ secrets.UPCLOUD_API_TEST_PASSWORD }}

test-with-laravel:
name: Test install with laravel
strategy:
matrix:
laravel-version:
- 9
- 10
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
- uses: actions/checkout@v2
- name: Test package can be required into laravel project
run: |
./test/test-install-with-laravel.sh ${{ matrix.laravel-version }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ git_push.sh
/phpunit.xml
/composer.lock
.phpunit.result.cache
tmp/
13 changes: 13 additions & 0 deletions test/test-install-with-laravel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh -xe

laravel_version=${1:-9}
dir="test-$laravel_version"

mkdir -p tmp
cd tmp
rm -rf $dir

composer create-project laravel/laravel $dir "^$laravel_version"
cd $dir
composer config repositories.dev path ../../
composer require upcloudltd/upcloud-php-api @dev

0 comments on commit 26cebb8

Please sign in to comment.