Skip to content

cache response

cache response #926

Workflow file for this run

name: Run tests
on: [push]
jobs:
run-tests:
name: Run tests
runs-on: ubuntu-latest
services:
redis:
image: redis
ports:
- 6379:6379
options: --entrypoint redis-server
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: none
- name: create db
run: |
sudo /etc/init.d/mysql start
mysql -u root -proot -e 'CREATE DATABASE IF NOT EXISTS freekdev_test;'
- name: Cache yarn dependencies
uses: actions/cache@v2
with:
path: node_modules
key: yarn-${{ hashFiles('yarn.lock') }}
- name: Run yarn
run: yarn && yarn dev
- name: Run composer install
run: composer install -n --prefer-dist
env:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
- name: Prepare Laravel Application
run: |
cp .env.example .env
php artisan key:generate
- name: Run tests
run: ./vendor/bin/pest
env:
DB_PASSWORD: root
REDIS_PORT: ${{ job.services.redis.ports[6379] }}