Delete Alternatives to Google Analytics.docx #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Laravel | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
laravel: | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql:5.7 | |
env: | |
MYSQL_ROOT_PASSWORD: password | |
MYSQL_DATABASE: database | |
MYSQL_USER: username | |
MYSQL_PASSWORD: password | |
# options: --socket=/var/run/mysqld/mysqld.sock | |
redis: | |
image: redis:4.0 | |
env: | |
REDIS_PASSWORD: password | |
memcached: | |
image: memcached:1.5 | |
env: | |
MEMCACHED_PASSWORD: password | |
steps: | |
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e | |
with: | |
php-version: '8.0' | |
- uses: actions/checkout@v3 | |
- name: Copy .env | |
run: php -r "file_exists('.env') || copy('.env.example', '.env');" | |
- name: Update dependencies | |
run: composer update | |
- name: Install Dependencies | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
- name: Generate key | |
run: php artisan key:generate | |
- name: Directory Permissions | |
run: chmod -R 777 storage bootstrap/cache | |
# - name: Create Database | |
- name: Execute tests (Unit and Feature tests) via PHPUnit | |
env: | |
DB_CONNECTION: mysql | |
DB_DATABASE: database | |
DB_USERNAME: username | |
DB_PASSWORD: password | |
run: vendor/bin/phpunit | |
# - name: Create Admin User | |
# run: mysql -h localhost -u username -p password -e "INSERT INTO users (username, email, password) VALUES ('admin', '[email protected]', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi');" | |
# deploy: | |
# runs-on:: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v2 | |
# - name: Install Dependencies | |
# run: composer install | |
# - name: Run Artisan Tasks | |
# run: php artisan migrate -y | |
# - name: Run PHPUnit Tests | |
# run: vendor/bin/phpunit | |
# - name: Generate Code Coverage Report | |
# run: vendor/bin/phpunit --coverage-text | |
# - name: Optimize Images | |
# run: vendor/bin/optipng public/images/* | |
# - name: Deploy to Server | |
# run: vendor/bin/envoyer |