Skip to content

Merge pull request #475 from range-of-motion/get-rid-of-command-for-d… #365

Merge pull request #475 from range-of-motion/get-rid-of-command-for-d…

Merge pull request #475 from range-of-motion/get-rid-of-command-for-d… #365

Workflow file for this run

name: Tests
on: [push]
jobs:
security-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Download binary
run: |
curl -L -s https://github.com/fabpot/local-php-security-checker/releases/download/v1.2.0/local-php-security-checker_1.2.0_linux_amd64 -o local-php-security-checker
chmod +x local-php-security-checker
- name: Run binary
run: ./local-php-security-checker
phpcs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- name: Install Composer dependencies
run: composer install --no-interaction
- name: Run PHPCS
run: vendor/bin/phpcs
phpunit:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_DATABASE: budget_testing
MYSQL_ROOT_PASSWORD: helloworld123
ports:
- 3306:3306
steps:
- uses: actions/checkout@v1
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Set up .env
run: php -r "file_exists('.env') || copy('.env.ci', '.env');"
- name: Install Composer dependencies
run: composer install --no-interaction
- name: Generate key
run: php artisan key:generate
- run: npm install
- run: npm run build
- name: Prepare database
run: php artisan migrate --database=testing
- name: Run PHPUnit
run: vendor/bin/phpunit --coverage-clover=coverage.xml
- name: Upload coverage
run: bash <(curl -s https://codecov.io/bash)
dusk:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_DATABASE: budget_testing
MYSQL_ROOT_PASSWORD: helloworld123
ports:
- 3306:3306
steps:
- uses: actions/checkout@v1
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Set up .env
run: php -r "file_exists('.env') || copy('.env.ci', '.env');"
- name: Install Composer dependencies
run: composer install --no-interaction
- name: Generate key
run: php artisan key:generate
- run: npm install
- run: npm run build
- name: Prepare database
run: php artisan migrate --database=testing
- name: Run Dusk
run: |
php artisan dusk:chrome-driver $(google-chrome -version | awk '{ print $3 }' | cut -d . -f 1)
nohup bash -c './vendor/laravel/dusk/bin/chromedriver-linux > /dev/null 2>&1 &'
nohup bash -c 'php artisan serve > /dev/null 2>&1 &'
php artisan dusk