Javier Feliz 92164921a5
All checks were successful
linter / quality (push) Successful in 4m4s
tests / ci (push) Successful in 9m1s
Update test action
2025-08-02 22:48:50 -04:00

72 lines
1.7 KiB
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: tests
on:
push:
branches:
- develop
- main
pull_request:
branches:
- develop
- main
jobs:
ci:
runs-on: ubuntu-latest
environment: Testing
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 i
- 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: Build Assets
run: npm run build
- name: Setup Test RSA Keys
run: |
echo "Setting up test RSA keys..."
mkdir -p storage/testing/oauth
php artisan app:generate-keys --path="storage/testing/oauth"
echo "✅ Test keys generated"
- name: Run Tests
run: ./vendor/bin/pest
- name: Cleanup Test Keys
if: always()
run: |
echo "Cleaning up test RSA keys..."
if [ -d "storage/testing" ]; then
rm -rf storage/testing
echo "✅ Test storage directory cleaned up"
else
echo " No test storage directory found to clean up"
fi