Skip to content

Feature/short url rules #58

Feature/short url rules

Feature/short url rules #58

Workflow file for this run

name: Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
unit-tests:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
env:
MYSQL_DATABASE: shortie
MYSQL_USER: shortie
MYSQL_PASSWORD: root
MYSQL_ROOT_PASSWORD: root
ports:
- 33306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
matrix:
php: [8.2, 8.3]
steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: ${{ matrix.php }}
- uses: actions/checkout@v3
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Install yarn
run: yarn && yarn run build
- name: Generate key
run: php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Execute tests (Unit and Feature tests) via PHPUnit
env:
MYSQL_DATABASE: shortie
DB_USERNAME: shortie
DB_PASSWORD: root
DB_PORT: ${{ job.services.mysql.ports[3306] }}
run: php artisan test