Skip to content

Components must always indicate their template otherwise they can't r… #2200

Components must always indicate their template otherwise they can't r…

Components must always indicate their template otherwise they can't r… #2200

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/[email protected]
# - 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.1'
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/[email protected]
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
- run: cp gatherling/config.php.github gatherling/config.php
- run: php gatherling/admin/db-upgrade.php
- run: php gatherling/util/insertcardset.php M10
- run: php gatherling/util/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