Skip to content

Deploy with Kamal

Deploy with Kamal #585

Workflow file for this run

name: Downstream CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
api-unit-test:
name: Laravel API Tests
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
env:
MYSQL_DATABASE: test_db
MYSQL_ROOT_PASSWORD: password
ports:
- 8989:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.ci', '.env');"
- name: Install Dependencies
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Generate key
run: php artisan key:generate
#- name: Set Directory Permissions
# run: chmod -R 777 storage bootstrap/cache
#- name: Run Database Migrations
# run: php artisan migrate
- name: Execute tests (Unit and Feature tests) via PHPUnit
run: vendor/bin/phpunit --exclude-group youtube
env:
YOUTUBE_KEY: ${{ secrets.YOUTUBE_KEY }}
SPOTIFY_CLIENT_ID: ${{ secrets.SPOTIFY_CLIENT_ID }}
SPOTIFY_CLIENT_SECRET: ${{ secrets.SPOTIFY_CLIENT_SECRET }}
#vue-app-tests:
# name: Vue App Tests
# runs-on: ubuntu-latest
# needs: api-unit-test
# steps:
# - uses: actions/checkout@v2
# - name: Setup Node v16.14.0
# uses: actions/setup-node@v1
# with:
# node-version: v16.14.0
# - name: Yarn Install
# working-directory: vue_app
# run: yarn install
# - name: Build Vue App
# working-directory: vue_app
# run: yarn build
# - name: Run Unit Tests
# working-directory: vue_app
# run: yarn test:unit