External project wireframe #2
Workflow file for this run
This file contains 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: Run tests | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
tests: | |
name: Run tests | |
runs-on: ubuntu-latest | |
services: | |
mariadb: | |
image: mariadb:10.11 | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: false | |
MYSQL_ROOT_PASSWORD: password | |
MYSQL_DATABASE: laravel | |
ports: | |
- 32574:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
strategy: | |
fail-fast: false | |
matrix: | |
php-versions: [ '8.2' ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: mbstring, dom, fileinfo, mysql, libxml, xml, xmlwriter, dom, tokenizer, filter, json, phar, pcre, openssl, pdo, intl, curl | |
coverage: xdebug | |
- name: Genererate auth.json | |
run: composer config http-basic.composer.fluxui.dev ${{secrets.FLUXUI_USERNAME}} ${{secrets.FLUXUI_PASSWORD}} | |
- name: Run composer install | |
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader | |
- name: Prepare Laravel Application | |
run: | | |
cp .env.ci .env.testing | |
php artisan key:generate --env=testing | |
- name: Run Migration | |
run: php artisan migrate -v --seed --env=testing | |
- name: Test with phpunit | |
run: php artisan test --coverage |