počeštění #2557
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: Run tests | |
# yamllint disable-line rule:truthy | |
on: | |
push: | |
branches: | |
- '**' # Ensure tests run on all branches, except beta and main | |
# beta a main si pouští testy samy, před deployem, | |
# viz deploy-beta.yml a deploy-ostra.yml | |
- '!beta' | |
- '!main' | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: 'Branch to run tests on' | |
required: false | |
default: 'main' | |
pull_request: | |
branches: | |
- main | |
types: | |
- opened | |
- synchronize # Ensures tests rerun on force-pushes | |
jobs: | |
run-tests: | |
strategy: | |
fail-fast: false | |
name: Run tests job | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' # musí odpovídat verzi na serveru | |
# extensions musí odpovídat seznamu v composer.json | |
extensions: >- | |
bcmath, curl, exif, fileinfo, gd, iconv, imagick, intl, json, | |
mbstring, mysqli, pdo, sqlite3, xmlreader, zip | |
tools: composer | |
coverage: none | |
- name: Setup MySQL for tests | |
uses: shogo82148/actions-setup-mysql@v1 | |
with: | |
mysql-version: 'mariadb-10.6' # mělo by odpovídat verzi na serveru | |
- name: Run tests | |
run: ./vendor/bin/phpunit |