Php unit and fixes #18
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: tests | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| - main | |
| pull_request: | |
| branches: | |
| - develop | |
| - main | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: 8.4 | |
| tools: composer:v2 | |
| coverage: xdebug | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| - name: Install Node Dependencies | |
| run: npm ci | |
| - name: Create SQLite Database | |
| run: touch database/database.sqlite | |
| - name: Debug Environment Variables | |
| run: | | |
| echo "FLUX_USERNAME is set: ${{ secrets.FLUX_USERNAME != '' }}" | |
| echo "FLUX_LICENSE_KEY is set: ${{ secrets.FLUX_LICENSE_KEY != '' }}" | |
| - name: Add Flux Credentials Loaded From ENV | |
| run: composer config http-basic.composer.fluxui.dev "${{ secrets.FLUX_USERNAME }}" "${{ secrets.FLUX_LICENSE_KEY }}" | |
| - name: Install Dependencies | |
| run: composer install --no-interaction --prefer-dist --optimize-autoloader | |
| - name: Copy Environment File | |
| run: cp .env.example .env | |
| - name: Generate Application Key | |
| run: php artisan key:generate | |
| - name: Publish Ziggy Configuration | |
| run: php artisan ziggy:generate | |
| - name: Build Assets | |
| run: npm run build | |
| - name: Tests | |
| run: ./vendor/bin/phpunit |