Skip to content

Run Tests

Run Tests #72

Workflow file for this run

name: "Run Tests"
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
pull_request:
branches:
- "*"
push:
branches:
- "*"
jobs:
run-tests:
runs-on: "ubuntu-24.04"
steps:
- name: "Checkout code"
uses: "actions/checkout@v4"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "8.2"
- name: Set up Docker Buildx
uses: "docker/setup-buildx-action@v3"
- name: "Cache dependencies installed with composer"
uses: "actions/cache@v4"
with:
path: "~/.composer/cache"
key: "php-8.2-composer-locked-${{ hashFiles('composer.lock') }}"
restore-keys: "php-8.2-composer-locked-"
- name: "Install dependencies with composer"
run: "composer install --no-interaction --no-progress"
- name: "Install laravel"
run: "composer global require laravel/installer"
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- shell: 'script -q -e -c "bash {0}"'
run: "./dokku-laravel new project1 project1 --no-interaction --migratoro"
- run: "cd project1 && php artisan serve &"
- run: "sleep 2"
- run: "curl -s 127.0.0.1:8000"
- run: "(curl -s 127.0.0.1:8000 | grep Laravel) || false"
- run: "cd project1 && docker compose up -d && sleep 5"
- run: "cd project1 && php artisan migrate"
- run: |
echo '<?php echo App\Models\User::count(); ?> users' > project1/resources/views/welcome.blade.php;
- run: "curl -s 127.0.0.1:8000"
- run: "(curl -s 127.0.0.1:8000 | grep '0 users') || false"