Skip to content

Avoid 500 when adding player to an event that is already entered but has no deck #2613

Avoid 500 when adding player to an event that is already entered but has no deck

Avoid 500 when adding player to an event that is already entered but has no deck #2613

Workflow file for this run

name: PHP Composer
on:
- push
- pull_request
jobs:
build:
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:10.6
env:
MYSQL_ROOT_PASSWORD: gatherling
ports:
- 3306:3306
steps:
- uses: actions/checkout@v4.2.2
# - name: Validate composer.json and composer.lock
# run: composer validate
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: curl, mysqli
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4.1.2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress
- name: Regenerate Autoloader
run: composer dump-autoload
- run: cp gatherling/config.php.github gatherling/config.php
- run: php gatherling/admin/db-upgrade.php
- run: php gatherling/insertcardset.php M10
- run: php gatherling/insertcardset.php ELD
- run: php gatherling/util/updateDefaultFormats.php
- run: vendor/bin/phpunit tests/
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md
# - name: Run test suite
# run: composer run-script test