Update docker/build-push-action digest to 4e4ee68 #304
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: lara | |
on: | |
push: | |
branches: [ "master", "develop" ] | |
pull_request: | |
branches: [ "master", "develop" ] | |
env: | |
# renovate: datasource=github-tags depName=nodejs/node versioning=node | |
NODE_VERSION: 18 | |
MARIADB_PASSWORD: lara | |
jobs: | |
laravel-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: shivammathur/setup-php@321f8d7d9abb7844b48c02c691274a99d2367205 | |
with: | |
php-version: '8.0' | |
- name: setup database | |
uses: shogo82148/[email protected] | |
with: | |
distribution: 'mariadb' | |
mysql-version: '10.9' | |
root-password: ${{env.MARIADB_PASSWORD}} | |
- run: mysql -uroot -p${{env.MARIADB_PASSWORD}} -h127.0.0.1 -e 'create database lara' | |
- 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: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{env.NODE_VERSION}} | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Build npm | |
run: npm install && npm run prod | |
- 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: | |
DB_CONNECTION: mysql | |
DB_HOST: 127.0.0.1 | |
DB_PORT: 3306 | |
DB_DATABASE: lara | |
DB_USERNAME: root | |
DB_PASSWORD: ${{env.MARIADB_PASSWORD}} | |
run: | | |
npm install | |
php artisan migrate:fresh --seed | |
php artisan test |