[wip] #185
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: 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] }} | |