Skip to content

Bump ip from 2.0.0 to 2.0.1 #251

Bump ip from 2.0.0 to 2.0.1

Bump ip from 2.0.0 to 2.0.1 #251

Workflow file for this run

name: Tests
on: [push]
jobs:
tests:
name: Run tests
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
env:
MYSQL_DATABASE: database_ci
MYSQL_USER: user
MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: secretroot
ports:
- 33306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v3
- name: Verify MySQL connection
run: |
mysql --version
sudo apt-get update
sudo apt-get install -y mysql-client openssl
mysql --host 127.0.0.1 --port ${{ job.services.mysql.ports['3306'] }} -uuser -psecret -e "SHOW DATABASES"
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, intl, zip, curl, mysql, json, xml
- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: vendor
key: composer-${{ hashFiles('composer.lock') }}
- name: Install dependencies
run: |
php --version
composer install -n --prefer-dist
- name: Boot Laravel application
run: |
cp .env.github .env
key=$(php artisan key:generate --show)
echo "APP_KEY=$key" >> .env
echo "Running with environment variables: "
cat .env
./artisan --version
./artisan config:cache
- name: Migrate database
run: |
mysql --version
php artisan migrate:fresh --seed
- name: Run PHPUnit tests
run: |
./artisan serve &
./vendor/bin/phpunit --version
./vendor/bin/phpunit
- name: Install Chrome Driver
run: php artisan dusk:chrome-driver `/opt/google/chrome/chrome --version | cut -d " " -f3 | cut -d "." -f1`
- name: Start Chrome Driver
run: ./vendor/laravel/dusk/bin/chromedriver-linux &
- name: Run dusk tests
run: ./artisan dusk
- name: Upload artifacts
uses: actions/upload-artifact@master
if: failure()
with:
name: Logs
path: /storage/logs