diff --git a/.env.ci b/.env.ci new file mode 100644 index 0000000..bddb2d3 --- /dev/null +++ b/.env.ci @@ -0,0 +1,7 @@ +# database +DB_CONNECTION=mysql +DB_HOST=mysql +DB_PORT=3306 +DB_DATABASE=test +DB_USERNAME=root +DB_PASSWORD=password diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.yml new file mode 100644 index 0000000..146b9a7 --- /dev/null +++ b/.github/workflows/laravel.yml @@ -0,0 +1,34 @@ +on: push +name: Laravel Test Suite w/ PHPUnit +jobs: + Testing: + runs-on: ubuntu-latest + container: + image: kirschbaumdevelopment/laravel-test-runner:8.2 + + services: + mysql: + image: mysql:5.7 + env: + MYSQL_ROOT_PASSWORD: password + MYSQL_DATABASE: test + ports: + - 33306:3306 + options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + + steps: + - uses: actions/checkout@v1 + with: + fetch-depth: 1 + + - name: Install composer dependencies + run: | + composer install --no-scripts + + - name: Prepare Laravel Application + run: | + cp .env.ci .env + php artisan key:generate + + - name: Run Test Suites + run: php artisan test diff --git a/phpunit.xml b/phpunit.xml index f112c0c..d078976 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -11,6 +11,10 @@ tests/Feature + + + tests/Jetstream/* + diff --git a/tests/Feature/ApiTokenPermissionsTest.php b/tests/Jetstream/ApiTokenPermissionsTest.php similarity index 97% rename from tests/Feature/ApiTokenPermissionsTest.php rename to tests/Jetstream/ApiTokenPermissionsTest.php index bdf7318..90de31b 100644 --- a/tests/Feature/ApiTokenPermissionsTest.php +++ b/tests/Jetstream/ApiTokenPermissionsTest.php @@ -1,6 +1,6 @@