Merge branch 'pulse' of github.com:spatie/freek.dev into pulse #938
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: 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] }} |