Skip to content

Commit

Permalink
Feature: Support testing of installations (includes L11 install) (#294)
Browse files Browse the repository at this point in the history
* Adjust version to Laravel 11

* Include high version for PHPUnit

* L11 does not support PHP8.1 either

* Fix PHPUnit version

* Use PHPUnit 9 again

* Attempt a new approach with multiple PHPUnit versions

* Adjust test script

* Use static function

* Work on PHPUnit 10 and 9 compatibility

* Change test name to fit better in the testsuite

* Add a version of tables that works across versions

* Remove dump and make SQLite work with the new exception

* Only Laravel 11 uses that exception

* Fix MySQL and attempt a fix for HTTP Eager Loading

* Also specify env variable for newer versions

* Support both PHPUnit 9 and PHPUnit 10

* Adjust for code coverage issue; should be fixed later on

* Also use PHP 8.3 now

* Also support doctrine/dbal 4.0 for L11 install ineropability, even though it is not actively used

* Adjust to use doctrine/dbal version that is compatible with L9

* First attempt at an installation test

* Do not it

* Adjust versioning

* Simply change workdir

* Add additional space

* Try including a dependency specification

* Removed specified package version

* Adjust to remove any old references to dependency versions
  • Loading branch information
ArlonAntonius committed Apr 7, 2024
1 parent 3a4afc1 commit 05fc332
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- laravel: 11.*
phpunit: 9.*

name: 'PHP ${{ matrix.php }} / Laravel: ${{ matrix.laravel }} / ${{ matrix.dependency-version }} / MySQL ${{ matrix.service }}'
name: 'Tests: PHP ${{ matrix.php }} / Laravel: ${{ matrix.laravel }} / ${{ matrix.dependency-version }} / MySQL ${{ matrix.service }}'

env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
Expand All @@ -59,3 +59,43 @@ jobs:

- name: Run tests
run: ./test --php ${{ matrix.php }} --laravel ${{ matrix.laravel }} --db ${{ matrix.service }} --dependencies ${{ matrix.dependency-version }} --phpunit ${{ matrix.phpunit }}

installation-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.0', '8.1', '8.2', "8.3"]
laravel: [9.0, 10.0, 11.0]
exclude:
# Laravel 10 does not support PHP 8.0
- php: '8.0'
laravel: 10.0
# Laravel 11 does not support PHP 8.0
- php: '8.0'
laravel: 11.0
# Laravel 11 does not support PHP 8.1
- php: '8.1'
laravel: 11.0

name: 'Installation: PHP ${{ matrix.php }} / Laravel: ${{ matrix.laravel }}'

env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

steps:
- uses: actions/checkout@v4
with:
path: ./package

- name: Install Laravel
run: docker run --rm -v ${PWD}:/app composer:latest composer create-project laravel/laravel:^${{ matrix.laravel }} application

- name: Add the package as a path repository
run: |
docker run --rm -v ${PWD}:/app --workdir /app/application composer:latest composer config repositories.0 path ../package
- name: Require the package
run: |
docker run --rm -v ${PWD}:/app --workdir /app/application composer:latest composer require tenancy/tenancy:dev-main

0 comments on commit 05fc332

Please sign in to comment.