Prevent upload on form error #38
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
# Adapted from https://github.com/TYPO3GmbH/blog/blob/master/.github/workflows/ci.yml | |
name: CI | |
on: [pull_request] | |
jobs: | |
coding: | |
name: Coding Standard | |
runs-on: 'ubuntu-18.04' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PHP with tools | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '7.4' | |
- name: Validate composer.json and composer.lock | |
run: composer validate | |
- name: Install dependencies with typo3/cms-core:^10.4 | |
run: | | |
composer require typo3/cms-core:^10.4 --no-progress | |
composer require typo3/cms-extensionmanager:^10.4 --no-progress | |
git checkout composer.json | |
- name: php-cs-fixer | |
run: composer ci:php:fixer | |
- name: Lint PHP | |
run: composer ci:php:lint | |
testing: | |
runs-on: 'ubuntu-18.04' | |
name: PHP Unit and Functional Tests | |
needs: coding | |
strategy: | |
fail-fast: true | |
matrix: | |
typo3: ['^10.4', '^11.5'] | |
php: ['7.4'] | |
include: | |
# Reduce side effects while running functional tests | |
- typo3: '^11.5' | |
php: '8.0' | |
- typo3: '^11.5' | |
php: '8.1' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Start MySQL Server at GitHub | |
if: ${{ env.GITHUB_ACTOR != 'nektos/act' }} | |
run: sudo systemctl start mysql.service | |
- name: Set up PHP Version ${{ matrix.php }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: mbstring, xml, ctype, iconv, intl, mysql | |
ini-values: memory_limit=512M, post_max_size=48M, max_execution_time=30 | |
coverage: none | |
- name: Install dependencies with typo3/cms-core:${{ matrix.typo3 }} | |
run: | | |
composer require typo3/cms-core:${{ matrix.typo3 }} --no-progress | |
composer require typo3/cms-extensionmanager:${{ matrix.typo3 }} --no-progress | |
composer require typo3/cms-form:${{ matrix.typo3 }} --no-progress | |
git checkout composer.json | |
- name: Functional Tests at Github | |
if: ${{ env.GITHUB_ACTOR != 'nektos/act' }} | |
env: | |
typo3DatabaseName: test | |
typo3DatabaseUsername: root | |
typo3DatabasePassword: root | |
typo3DatabaseHost: 127.0.0.1 | |
COMPOSER_PROCESS_TIMEOUT: 600 | |
run: composer ci:tests:functional | |
# Will only work, if you define an env file with act --env-file | |
# act pull_request -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04 --env-file ~/htdocs/.env.act.ci | |
# The env file must contain these typo3Database* vars | |
- name: Functional Tests locally | |
if: ${{ env.GITHUB_ACTOR == 'nektos/act' }} | |
env: | |
typo3DatabaseName: 'db' | |
COMPOSER_PROCESS_TIMEOUT: 600 | |
run: composer ci:tests:functional |