Skip to content

WIP Feature: new table for values #17

WIP Feature: new table for values

WIP Feature: new table for values #17

Workflow file for this run

name: Test
on:
- push
jobs:
test:
strategy:
matrix:
operating-system:
- ubuntu-latest
php-version:
- '8.4'
name: php ${{ matrix.php-version }} on ${{ matrix.operating-system }}
services:
mariadb:
image: mariadb:10.11
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: stufis_ci
MYSQL_USER: stufis_ci
MYSQL_PASSWORD: password
ports:
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
runs-on: ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: bcmath, ctype, fileinfo, json, mbstring, openssl, pdo, tokenizer, xml, zip, gd
coverage: xdebug
- name: Prepare the environment
run: cp .env.ci .env
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Setup composer cache
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install composer dependencies
env:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: run npm
run: npm ci
- name: build assets
run: npm run build
- name: run migrations
run: php artisan migrate --seed
env:
DB_CONNECTION: 'mariadb-testing'
DB_PORT: ${{ job.services.mariadb.ports['3306'] }}
- name: Run tests
run: vendor/bin/pest
env:
DB_CONNECTION: 'mariadb-testing'
DB_PORT: ${{ job.services.mariadb.ports['3306'] }}