Skip to content

Additional updates #1243

Additional updates

Additional updates #1243

Workflow file for this run

name: PHP Composer
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
## Accessing to Github secrets, where you can store your configuration
MYSQL_ALLOW_EMPTY_PASSWORD: false
MYSQL_ROOT_PASSWORD: db-password
MYSQL_DATABASE: event-repo-db-name
## map the "external" 33306 port with the "internal" 3306
ports:
- 33306:3306
# Set health checks to wait until mysql database has started (it takes some seconds to start)
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: intl #optional
ini-values: "post_max_size=256M" #optional
- name: Check PHP Version
run: php
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies
run: composer install --quiet --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
- name: Install NPM Dependencies
run: npm install
- name: Clear Config
run: php artisan config:clear
- name: Generate Key
run: php artisan key:generate
- name: Create asset storage path
run: mkdir -p ${{ github.workspace }}/public/storage/photos
- name: Create symlink
run: php artisan storage:link
- name: Output the phpstan config
run: more phpstan.neon.dist
- name: Run php stan static analysis
run: composer run-script phpstan
- name: Run test suite
env:
APP_URL: http://localhost
FACEBOOK_APP_ID: 7777777
FACEBOOK_APP_SECRET: 6666666
FACEBOOK_GRAPH_VERSION: v2.1
DB_CONNECTION: mysql
DB_HOST: 127.0.0.1
DB_DATABASE: event-repo-db-name
DB_PORT: 33306
DB_USER: root
DB_PASSWORD: db-password
run: composer run-script tests