Skip to content

Feat: Add file support #238

Feat: Add file support

Feat: Add file support #238

Workflow file for this run

name: Checks
on:
push:
branches:
- main
- 'feature/*'
pull_request:
branches:
- main
jobs:
tests:
name: Run Tests
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: trakli
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping --silent"
--health-interval=10s
--health-timeout=5s
--health-retries=3
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
tools: composer
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest --no-interaction
- name: Copy .env file
run: cp .env.example .env
- name: Update .env file
run: |
sed -i 's/APP_ENV=local/APP_ENV=testing/' .env
sed -i 's/DB_HOST=mysql/DB_HOST=127.0.0.1/' .env
sed -i 's/DB_PORT=3306/DB_PORT=3306/' .env
sed -i 's/DB_DATABASE=trakli/DB_DATABASE=trakli/' .env
sed -i 's/DB_USERNAME=trakli/DB_USERNAME=root/' .env
- name: Generate application key
run: php artisan key:generate
- name: Configure database
run: |
php artisan config:clear
php artisan config:cache
- name: Run migrations
run: php artisan migrate --seed
- name: Run tests
run: php artisan test
- name: Lint code
run: composer pint:test
- name: Ensure OpenAPI documentation is up to date
run: composer openapi:test