Skip to content

Feat: api resources #179

Feat: api resources

Feat: api resources #179

Workflow file for this run

name: Tests
on:
pull_request:
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
jobs:
tests:
name: PHP tests (PHP ${{ matrix.php-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php-version: [ 8.3 ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
coverage: xdebug
php-version: ${{ inputs.php-version }}
- name: Get composer cache directory
id: composer-cache
shell: bash
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Restore composer cache
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install composer dependencies
run: composer install --no-progress
- name: Install npm dependencies
run: npm install
- name: Run Build for Production
run: npm run build
- name: Copy .env
run: cp .env.testing.example .env.testing
- name: Generate key
run: php artisan key:generate --env=testing
- name: Run tests
run: composer test
env:
DB_PORT: ${{ job.services.mysql.ports[3306] }}